@vue/compiler-ssr 3.5.21 → 3.5.23

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.5.21
2
+ * @vue/compiler-ssr v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -298,6 +298,14 @@ const ssrTransformElement = (node, context) => {
298
298
  const hasCustomDir = node.props.some(
299
299
  (p) => p.type === 7 && !shared.isBuiltInDirective(p.name)
300
300
  );
301
+ const vShowPropIndex = node.props.findIndex(
302
+ (i) => i.type === 7 && i.name === "show"
303
+ );
304
+ if (vShowPropIndex !== -1) {
305
+ const vShowProp = node.props[vShowPropIndex];
306
+ node.props.splice(vShowPropIndex, 1);
307
+ node.props.push(vShowProp);
308
+ }
301
309
  const needMergeProps = hasDynamicVBind || hasCustomDir;
302
310
  if (needMergeProps) {
303
311
  const { props, directives } = compilerDom.buildProps(
@@ -316,7 +324,7 @@ const ssrTransformElement = (node, context) => {
316
324
  );
317
325
  if (node.tag === "textarea") {
318
326
  const existingText = node.children[0];
319
- if (!existingText || existingText.type !== 5) {
327
+ if (!hasContentOverrideDirective(node) && (!existingText || existingText.type !== 5)) {
320
328
  const tempId = `_temp${context.temps++}`;
321
329
  propsExp.arguments = [
322
330
  compilerDom.createAssignmentExpression(
@@ -363,8 +371,7 @@ const ssrTransformElement = (node, context) => {
363
371
  ];
364
372
  }
365
373
  } else if (directives.length && !node.children.length) {
366
- const vText = compilerDom.findDir(node, "text");
367
- if (!vText) {
374
+ if (!hasContentOverrideDirective(node)) {
368
375
  const tempId = `_temp${context.temps++}`;
369
376
  propsExp.arguments = [
370
377
  compilerDom.createAssignmentExpression(
@@ -578,6 +585,9 @@ function findVModel(node) {
578
585
  (p) => p.type === 7 && p.name === "model" && p.exp
579
586
  );
580
587
  }
588
+ function hasContentOverrideDirective(node) {
589
+ return !!compilerDom.findDir(node, "text") || !!compilerDom.findDir(node, "html");
590
+ }
581
591
  function ssrProcessElement(node, context) {
582
592
  const isVoidTag = context.options.isVoidTag || shared.NO;
583
593
  const elementsToAdd = node.ssrCodegenNode.elements;
@@ -1365,6 +1375,7 @@ function compile(source, options = {}) {
1365
1375
  ...options,
1366
1376
  hoistStatic: false,
1367
1377
  nodeTransforms: [
1378
+ compilerDom.transformVBindShorthand,
1368
1379
  ssrTransformIf,
1369
1380
  ssrTransformFor,
1370
1381
  compilerDom.trackVForSlotScopes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-ssr",
3
- "version": "3.5.21",
3
+ "version": "3.5.23",
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.5.21",
32
- "@vue/compiler-dom": "3.5.21"
31
+ "@vue/shared": "3.5.23",
32
+ "@vue/compiler-dom": "3.5.23"
33
33
  }
34
34
  }