@vue/compiler-ssr 3.4.20 → 3.4.22
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.
- package/dist/compiler-ssr.cjs.js +18 -6
- package/package.json +3 -3
package/dist/compiler-ssr.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-ssr v3.4.
|
|
2
|
+
* @vue/compiler-ssr v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -56,7 +56,7 @@ const ssrTransformIf = compilerDom.createStructuralDirectiveTransform(
|
|
|
56
56
|
/^(if|else|else-if)$/,
|
|
57
57
|
compilerDom.processIf
|
|
58
58
|
);
|
|
59
|
-
function ssrProcessIf(node, context, disableNestedFragments = false) {
|
|
59
|
+
function ssrProcessIf(node, context, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
|
|
60
60
|
const [rootBranch] = node.branches;
|
|
61
61
|
const ifStatement = compilerDom.createIfStatement(
|
|
62
62
|
rootBranch.condition,
|
|
@@ -80,7 +80,7 @@ function ssrProcessIf(node, context, disableNestedFragments = false) {
|
|
|
80
80
|
currentIf.alternate = branchBlockStatement;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
if (!currentIf.alternate) {
|
|
83
|
+
if (!currentIf.alternate && !disableCommentAsIfAlternate) {
|
|
84
84
|
currentIf.alternate = compilerDom.createBlockStatement([
|
|
85
85
|
compilerDom.createCallExpression(`_push`, ["`<!---->`"])
|
|
86
86
|
]);
|
|
@@ -617,6 +617,13 @@ function ssrProcessTransitionGroup(node, context) {
|
|
|
617
617
|
* be patched using the same key map) so we need to account for that here
|
|
618
618
|
* by disabling nested fragment wrappers from being generated.
|
|
619
619
|
*/
|
|
620
|
+
true,
|
|
621
|
+
/**
|
|
622
|
+
* TransitionGroup filters out comment children at runtime and thus
|
|
623
|
+
* doesn't expect comments to be present during hydration. We need to
|
|
624
|
+
* account for that by disabling the empty comment that is otherwise
|
|
625
|
+
* rendered for a falsy v-if that has no v-else specified. (#6715)
|
|
626
|
+
*/
|
|
620
627
|
true
|
|
621
628
|
);
|
|
622
629
|
context.pushStringPart(`</`);
|
|
@@ -635,7 +642,7 @@ function ssrProcessTransitionGroup(node, context) {
|
|
|
635
642
|
context.pushStringPart(`</${tag.value.content}>`);
|
|
636
643
|
}
|
|
637
644
|
} else {
|
|
638
|
-
processChildren(node, context, true, true);
|
|
645
|
+
processChildren(node, context, true, true, true);
|
|
639
646
|
}
|
|
640
647
|
}
|
|
641
648
|
|
|
@@ -953,7 +960,7 @@ function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) {
|
|
|
953
960
|
withSlotScopeId
|
|
954
961
|
);
|
|
955
962
|
}
|
|
956
|
-
function processChildren(parent, context, asFragment = false, disableNestedFragments = false) {
|
|
963
|
+
function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
|
|
957
964
|
if (asFragment) {
|
|
958
965
|
context.pushStringPart(`<!--[-->`);
|
|
959
966
|
}
|
|
@@ -999,7 +1006,12 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
|
|
|
999
1006
|
);
|
|
1000
1007
|
break;
|
|
1001
1008
|
case 9:
|
|
1002
|
-
ssrProcessIf(
|
|
1009
|
+
ssrProcessIf(
|
|
1010
|
+
child,
|
|
1011
|
+
context,
|
|
1012
|
+
disableNestedFragments,
|
|
1013
|
+
disableCommentAsIfAlternate
|
|
1014
|
+
);
|
|
1003
1015
|
break;
|
|
1004
1016
|
case 11:
|
|
1005
1017
|
ssrProcessFor(child, context, disableNestedFragments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-ssr",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.22",
|
|
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.
|
|
32
|
-
"@vue/compiler-dom": "3.4.
|
|
31
|
+
"@vue/shared": "3.4.22",
|
|
32
|
+
"@vue/compiler-dom": "3.4.22"
|
|
33
33
|
}
|
|
34
34
|
}
|