@vue/compiler-ssr 3.4.34 → 3.4.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-ssr v3.4.34
2
+ * @vue/compiler-ssr v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -359,6 +359,25 @@ const ssrTransformElement = (node, context) => {
359
359
  ])
360
360
  ];
361
361
  }
362
+ } else if (directives.length && !node.children.length) {
363
+ const tempId = `_temp${context.temps++}`;
364
+ propsExp.arguments = [
365
+ compilerDom.createAssignmentExpression(
366
+ compilerDom.createSimpleExpression(tempId, false),
367
+ mergedProps
368
+ )
369
+ ];
370
+ rawChildrenMap.set(
371
+ node,
372
+ compilerDom.createConditionalExpression(
373
+ compilerDom.createSimpleExpression(`"textContent" in ${tempId}`, false),
374
+ compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [
375
+ compilerDom.createSimpleExpression(`${tempId}.textContent`, false)
376
+ ]),
377
+ compilerDom.createSimpleExpression(`${tempId}.innerHTML ?? ''`, false),
378
+ false
379
+ )
380
+ );
362
381
  }
363
382
  if (needTagForRuntime) {
364
383
  propsExp.arguments.push(`"${node.tag}"`);
@@ -647,7 +666,7 @@ function ssrProcessTransitionGroup(node, context) {
647
666
  context.pushStringPart(` ${scopeId}`);
648
667
  }
649
668
  context.pushStringPart(`>`);
650
- processChildren(node, context, false, true);
669
+ processChildren(node, context, false, true, true);
651
670
  context.pushStringPart(`</${tag.value.content}>`);
652
671
  }
653
672
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-ssr",
3
- "version": "3.4.34",
3
+ "version": "3.4.36",
4
4
  "description": "@vue/compiler-ssr",
5
5
  "main": "dist/compiler-ssr.cjs.js",
6
6
  "types": "dist/compiler-ssr.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
30
30
  "dependencies": {
31
- "@vue/shared": "3.4.34",
32
- "@vue/compiler-dom": "3.4.34"
31
+ "@vue/compiler-dom": "3.4.36",
32
+ "@vue/shared": "3.4.36"
33
33
  }
34
34
  }