@vue/compiler-core 3.2.35 → 3.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1798,6 +1798,14 @@ function getConstantType(node, context) {
1798
1798
  // static then they don't need to be blocks since there will be no
1799
1799
  // nested updates.
1800
1800
  if (codegenNode.isBlock) {
1801
+ // except set custom directives.
1802
+ for (let i = 0; i < node.props.length; i++) {
1803
+ const p = node.props[i];
1804
+ if (p.type === 7 /* DIRECTIVE */) {
1805
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
1806
+ return 0 /* NOT_CONSTANT */;
1807
+ }
1808
+ }
1801
1809
  context.removeHelper(OPEN_BLOCK);
1802
1810
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
1803
1811
  codegenNode.isBlock = false;
@@ -1770,6 +1770,14 @@ function getConstantType(node, context) {
1770
1770
  // static then they don't need to be blocks since there will be no
1771
1771
  // nested updates.
1772
1772
  if (codegenNode.isBlock) {
1773
+ // except set custom directives.
1774
+ for (let i = 0; i < node.props.length; i++) {
1775
+ const p = node.props[i];
1776
+ if (p.type === 7 /* DIRECTIVE */) {
1777
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
1778
+ return 0 /* NOT_CONSTANT */;
1779
+ }
1780
+ }
1773
1781
  context.removeHelper(OPEN_BLOCK);
1774
1782
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
1775
1783
  codegenNode.isBlock = false;
@@ -1783,6 +1783,14 @@ function getConstantType(node, context) {
1783
1783
  // static then they don't need to be blocks since there will be no
1784
1784
  // nested updates.
1785
1785
  if (codegenNode.isBlock) {
1786
+ // except set custom directives.
1787
+ for (let i = 0; i < node.props.length; i++) {
1788
+ const p = node.props[i];
1789
+ if (p.type === 7 /* DIRECTIVE */) {
1790
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
1791
+ return 0 /* NOT_CONSTANT */;
1792
+ }
1793
+ }
1786
1794
  context.removeHelper(OPEN_BLOCK);
1787
1795
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
1788
1796
  codegenNode.isBlock = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-core",
3
- "version": "3.2.35",
3
+ "version": "3.2.36",
4
4
  "description": "@vue/compiler-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/compiler-core.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.2.35",
35
+ "@vue/shared": "3.2.36",
36
36
  "@babel/parser": "^7.16.4",
37
37
  "estree-walker": "^2.0.2",
38
38
  "source-map": "^0.6.1"