@vue/compat 3.2.15 → 3.2.19
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/vue.cjs.js +54 -50
- package/dist/vue.cjs.prod.js +53 -42
- package/dist/vue.esm-browser.js +17 -16
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +93 -26
- package/dist/vue.global.js +16 -15
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +14 -14
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +90 -24
- package/dist/vue.runtime.global.js +13 -13
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.cjs.js
CHANGED
|
@@ -1661,14 +1661,7 @@ const hmrDirtyComponents = new Set();
|
|
|
1661
1661
|
// Note: for a component to be eligible for HMR it also needs the __hmrId option
|
|
1662
1662
|
// to be set so that its instances can be registered / removed.
|
|
1663
1663
|
{
|
|
1664
|
-
|
|
1665
|
-
? global
|
|
1666
|
-
: typeof self !== 'undefined'
|
|
1667
|
-
? self
|
|
1668
|
-
: typeof window !== 'undefined'
|
|
1669
|
-
? window
|
|
1670
|
-
: {};
|
|
1671
|
-
globalObject.__VUE_HMR_RUNTIME__ = {
|
|
1664
|
+
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
1672
1665
|
createRecord: tryWrap(createRecord),
|
|
1673
1666
|
rerender: tryWrap(rerender),
|
|
1674
1667
|
reload: tryWrap(reload)
|
|
@@ -5430,7 +5423,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5430
5423
|
return vm;
|
|
5431
5424
|
}
|
|
5432
5425
|
}
|
|
5433
|
-
Vue.version = "3.2.
|
|
5426
|
+
Vue.version = "3.2.19";
|
|
5434
5427
|
Vue.config = singletonApp.config;
|
|
5435
5428
|
Vue.use = (p, ...options) => {
|
|
5436
5429
|
if (p && isFunction(p.install)) {
|
|
@@ -9781,19 +9774,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
9781
9774
|
}
|
|
9782
9775
|
}
|
|
9783
9776
|
// template / render function normalization
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
//
|
|
9787
|
-
//
|
|
9788
|
-
|
|
9789
|
-
// function from mixins/extend
|
|
9790
|
-
instance.render = (instance.render ||
|
|
9791
|
-
Component.render ||
|
|
9792
|
-
NOOP);
|
|
9793
|
-
}
|
|
9794
|
-
else if (!instance.render) {
|
|
9795
|
-
// could be set from setup()
|
|
9796
|
-
if (compile && !Component.render) {
|
|
9777
|
+
// could be already set when returned from setup()
|
|
9778
|
+
if (!instance.render) {
|
|
9779
|
+
// only do on-the-fly compile if not in SSR - SSR on-the-fly compliation
|
|
9780
|
+
// is done by server-renderer
|
|
9781
|
+
if (!isSSR && compile && !Component.render) {
|
|
9797
9782
|
const template = (instance.vnode.props &&
|
|
9798
9783
|
instance.vnode.props['inline-template']) ||
|
|
9799
9784
|
Component.template;
|
|
@@ -11030,7 +11015,7 @@ function isMemoSame(cached, memo) {
|
|
|
11030
11015
|
}
|
|
11031
11016
|
|
|
11032
11017
|
// Core API ------------------------------------------------------------------
|
|
11033
|
-
const version = "3.2.
|
|
11018
|
+
const version = "3.2.19";
|
|
11034
11019
|
const _ssrUtils = {
|
|
11035
11020
|
createComponentInstance,
|
|
11036
11021
|
setupComponent,
|
|
@@ -12478,8 +12463,9 @@ function callModelHook(el, binding, vnode, prevVNode, hook) {
|
|
|
12478
12463
|
const fn = modelToUse[hook];
|
|
12479
12464
|
fn && fn(el, binding, vnode, prevVNode);
|
|
12480
12465
|
}
|
|
12481
|
-
// SSR vnode transforms
|
|
12482
|
-
|
|
12466
|
+
// SSR vnode transforms, only used when user includes client-oriented render
|
|
12467
|
+
// function in SSR
|
|
12468
|
+
function initVModelForSSR() {
|
|
12483
12469
|
vModelText.getSSRProps = ({ value }) => ({ value });
|
|
12484
12470
|
vModelRadio.getSSRProps = ({ value }, vnode) => {
|
|
12485
12471
|
if (vnode.props && looseEqual(vnode.props.value, value)) {
|
|
@@ -12627,15 +12613,17 @@ const vShow = {
|
|
|
12627
12613
|
setDisplay(el, value);
|
|
12628
12614
|
}
|
|
12629
12615
|
};
|
|
12630
|
-
{
|
|
12616
|
+
function setDisplay(el, value) {
|
|
12617
|
+
el.style.display = value ? el._vod : 'none';
|
|
12618
|
+
}
|
|
12619
|
+
// SSR vnode transforms, only used when user includes client-oriented render
|
|
12620
|
+
// function in SSR
|
|
12621
|
+
function initVShowForSSR() {
|
|
12631
12622
|
vShow.getSSRProps = ({ value }) => {
|
|
12632
12623
|
if (!value) {
|
|
12633
12624
|
return { style: { display: 'none' } };
|
|
12634
12625
|
}
|
|
12635
12626
|
};
|
|
12636
|
-
}
|
|
12637
|
-
function setDisplay(el, value) {
|
|
12638
|
-
el.style.display = value ? el._vod : 'none';
|
|
12639
12627
|
}
|
|
12640
12628
|
|
|
12641
12629
|
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
@@ -12770,7 +12758,19 @@ function normalizeContainer(container) {
|
|
|
12770
12758
|
warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
|
12771
12759
|
}
|
|
12772
12760
|
return container;
|
|
12773
|
-
}
|
|
12761
|
+
}
|
|
12762
|
+
let ssrDirectiveInitialized = false;
|
|
12763
|
+
/**
|
|
12764
|
+
* @internal
|
|
12765
|
+
*/
|
|
12766
|
+
const initDirectivesForSSR = () => {
|
|
12767
|
+
if (!ssrDirectiveInitialized) {
|
|
12768
|
+
ssrDirectiveInitialized = true;
|
|
12769
|
+
initVModelForSSR();
|
|
12770
|
+
initVShowForSSR();
|
|
12771
|
+
}
|
|
12772
|
+
}
|
|
12773
|
+
;
|
|
12774
12774
|
|
|
12775
12775
|
var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
12776
12776
|
__proto__: null,
|
|
@@ -12778,6 +12778,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12778
12778
|
hydrate: hydrate,
|
|
12779
12779
|
createApp: createApp,
|
|
12780
12780
|
createSSRApp: createSSRApp,
|
|
12781
|
+
initDirectivesForSSR: initDirectivesForSSR,
|
|
12781
12782
|
defineCustomElement: defineCustomElement,
|
|
12782
12783
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
12783
12784
|
VueElement: VueElement,
|
|
@@ -13260,21 +13261,21 @@ function isCoreComponent(tag) {
|
|
|
13260
13261
|
const nonIdentifierRE = /^\d|[^\$\w]/;
|
|
13261
13262
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
13262
13263
|
const isMemberExpressionNode = (path, context) => {
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13264
|
+
try {
|
|
13265
|
+
let ret = parser.parseExpression(path, {
|
|
13266
|
+
plugins: [...context.expressionPlugins, ...babelParserDefaultPlugins]
|
|
13267
|
+
});
|
|
13268
|
+
if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') {
|
|
13269
|
+
ret = ret.expression;
|
|
13270
|
+
}
|
|
13271
|
+
return (ret.type === 'MemberExpression' ||
|
|
13272
|
+
ret.type === 'OptionalMemberExpression' ||
|
|
13273
|
+
ret.type === 'Identifier');
|
|
13269
13274
|
}
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
}
|
|
13274
|
-
catch (e) {
|
|
13275
|
-
return false;
|
|
13276
|
-
}
|
|
13277
|
-
};
|
|
13275
|
+
catch (e) {
|
|
13276
|
+
return false;
|
|
13277
|
+
}
|
|
13278
|
+
};
|
|
13278
13279
|
const isMemberExpression = isMemberExpressionNode;
|
|
13279
13280
|
function getInnerRange(loc, offset, length) {
|
|
13280
13281
|
const source = loc.source.substr(offset, length);
|
|
@@ -15062,7 +15063,7 @@ function createStructuralDirectiveTransform(name, fn) {
|
|
|
15062
15063
|
}
|
|
15063
15064
|
|
|
15064
15065
|
const PURE_ANNOTATION = `/*#__PURE__*/`;
|
|
15065
|
-
function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssr = false, isTS = false, inSSR = false }) {
|
|
15066
|
+
function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) {
|
|
15066
15067
|
const context = {
|
|
15067
15068
|
mode,
|
|
15068
15069
|
prefixIdentifiers,
|
|
@@ -15072,6 +15073,7 @@ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode
|
|
|
15072
15073
|
optimizeImports,
|
|
15073
15074
|
runtimeGlobalName,
|
|
15074
15075
|
runtimeModuleName,
|
|
15076
|
+
ssrRuntimeModuleName,
|
|
15075
15077
|
ssr,
|
|
15076
15078
|
isTS,
|
|
15077
15079
|
inSSR,
|
|
@@ -15248,7 +15250,7 @@ function generate(ast, options = {}) {
|
|
|
15248
15250
|
};
|
|
15249
15251
|
}
|
|
15250
15252
|
function genFunctionPreamble(ast, context) {
|
|
15251
|
-
const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName } = context;
|
|
15253
|
+
const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context;
|
|
15252
15254
|
const VueBinding = ssr
|
|
15253
15255
|
? `require(${JSON.stringify(runtimeModuleName)})`
|
|
15254
15256
|
: runtimeGlobalName;
|
|
@@ -15288,14 +15290,14 @@ function genFunctionPreamble(ast, context) {
|
|
|
15288
15290
|
// ssr guarantees prefixIdentifier: true
|
|
15289
15291
|
push(`const { ${ast.ssrHelpers
|
|
15290
15292
|
.map(aliasHelper)
|
|
15291
|
-
.join(', ')} } = require("
|
|
15293
|
+
.join(', ')} } = require("${ssrRuntimeModuleName}")\n`);
|
|
15292
15294
|
}
|
|
15293
15295
|
genHoists(ast.hoists, context);
|
|
15294
15296
|
newline();
|
|
15295
15297
|
push(`return `);
|
|
15296
15298
|
}
|
|
15297
15299
|
function genModulePreamble(ast, context, genScopeId, inline) {
|
|
15298
|
-
const { push, newline, optimizeImports, runtimeModuleName } = context;
|
|
15300
|
+
const { push, newline, optimizeImports, runtimeModuleName, ssrRuntimeModuleName } = context;
|
|
15299
15301
|
if (genScopeId && ast.hoists.length) {
|
|
15300
15302
|
ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID);
|
|
15301
15303
|
}
|
|
@@ -15323,7 +15325,7 @@ function genModulePreamble(ast, context, genScopeId, inline) {
|
|
|
15323
15325
|
if (ast.ssrHelpers && ast.ssrHelpers.length) {
|
|
15324
15326
|
push(`import { ${ast.ssrHelpers
|
|
15325
15327
|
.map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`)
|
|
15326
|
-
.join(', ')} } from "
|
|
15328
|
+
.join(', ')} } from "${ssrRuntimeModuleName}"\n`);
|
|
15327
15329
|
}
|
|
15328
15330
|
if (ast.imports.length) {
|
|
15329
15331
|
genImports(ast.imports, context);
|
|
@@ -16625,7 +16627,9 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
|
|
|
16625
16627
|
? createSimpleExpression(keyProp.value.content, true)
|
|
16626
16628
|
: keyProp.exp);
|
|
16627
16629
|
const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
|
|
16628
|
-
if (context.prefixIdentifiers &&
|
|
16630
|
+
if (context.prefixIdentifiers &&
|
|
16631
|
+
keyProperty &&
|
|
16632
|
+
keyProp.type !== 6 /* ATTRIBUTE */) {
|
|
16629
16633
|
// #2085 process :key expression needs to be processed in order for it
|
|
16630
16634
|
// to behave consistently for <template v-for> and <div v-for>.
|
|
16631
16635
|
// In the case of `<template v-for>`, the node is discarded and never
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -4259,7 +4259,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
4259
4259
|
return vm;
|
|
4260
4260
|
}
|
|
4261
4261
|
}
|
|
4262
|
-
Vue.version = "3.2.
|
|
4262
|
+
Vue.version = "3.2.19";
|
|
4263
4263
|
Vue.config = singletonApp.config;
|
|
4264
4264
|
Vue.use = (p, ...options) => {
|
|
4265
4265
|
if (p && isFunction(p.install)) {
|
|
@@ -8053,19 +8053,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8053
8053
|
convertLegacyRenderFn(instance);
|
|
8054
8054
|
}
|
|
8055
8055
|
// template / render function normalization
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
//
|
|
8059
|
-
//
|
|
8060
|
-
|
|
8061
|
-
// function from mixins/extend
|
|
8062
|
-
instance.render = (instance.render ||
|
|
8063
|
-
Component.render ||
|
|
8064
|
-
NOOP);
|
|
8065
|
-
}
|
|
8066
|
-
else if (!instance.render) {
|
|
8067
|
-
// could be set from setup()
|
|
8068
|
-
if (compile && !Component.render) {
|
|
8056
|
+
// could be already set when returned from setup()
|
|
8057
|
+
if (!instance.render) {
|
|
8058
|
+
// only do on-the-fly compile if not in SSR - SSR on-the-fly compliation
|
|
8059
|
+
// is done by server-renderer
|
|
8060
|
+
if (!isSSR && compile && !Component.render) {
|
|
8069
8061
|
const template = (instance.vnode.props &&
|
|
8070
8062
|
instance.vnode.props['inline-template']) ||
|
|
8071
8063
|
Component.template;
|
|
@@ -8938,7 +8930,7 @@ function isMemoSame(cached, memo) {
|
|
|
8938
8930
|
}
|
|
8939
8931
|
|
|
8940
8932
|
// Core API ------------------------------------------------------------------
|
|
8941
|
-
const version = "3.2.
|
|
8933
|
+
const version = "3.2.19";
|
|
8942
8934
|
const _ssrUtils = {
|
|
8943
8935
|
createComponentInstance,
|
|
8944
8936
|
setupComponent,
|
|
@@ -10336,8 +10328,9 @@ function callModelHook(el, binding, vnode, prevVNode, hook) {
|
|
|
10336
10328
|
const fn = modelToUse[hook];
|
|
10337
10329
|
fn && fn(el, binding, vnode, prevVNode);
|
|
10338
10330
|
}
|
|
10339
|
-
// SSR vnode transforms
|
|
10340
|
-
|
|
10331
|
+
// SSR vnode transforms, only used when user includes client-oriented render
|
|
10332
|
+
// function in SSR
|
|
10333
|
+
function initVModelForSSR() {
|
|
10341
10334
|
vModelText.getSSRProps = ({ value }) => ({ value });
|
|
10342
10335
|
vModelRadio.getSSRProps = ({ value }, vnode) => {
|
|
10343
10336
|
if (vnode.props && looseEqual(vnode.props.value, value)) {
|
|
@@ -10482,15 +10475,17 @@ const vShow = {
|
|
|
10482
10475
|
setDisplay(el, value);
|
|
10483
10476
|
}
|
|
10484
10477
|
};
|
|
10485
|
-
{
|
|
10478
|
+
function setDisplay(el, value) {
|
|
10479
|
+
el.style.display = value ? el._vod : 'none';
|
|
10480
|
+
}
|
|
10481
|
+
// SSR vnode transforms, only used when user includes client-oriented render
|
|
10482
|
+
// function in SSR
|
|
10483
|
+
function initVShowForSSR() {
|
|
10486
10484
|
vShow.getSSRProps = ({ value }) => {
|
|
10487
10485
|
if (!value) {
|
|
10488
10486
|
return { style: { display: 'none' } };
|
|
10489
10487
|
}
|
|
10490
10488
|
};
|
|
10491
|
-
}
|
|
10492
|
-
function setDisplay(el, value) {
|
|
10493
|
-
el.style.display = value ? el._vod : 'none';
|
|
10494
10489
|
}
|
|
10495
10490
|
|
|
10496
10491
|
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
@@ -10559,7 +10554,19 @@ function normalizeContainer(container) {
|
|
|
10559
10554
|
return res;
|
|
10560
10555
|
}
|
|
10561
10556
|
return container;
|
|
10562
|
-
}
|
|
10557
|
+
}
|
|
10558
|
+
let ssrDirectiveInitialized = false;
|
|
10559
|
+
/**
|
|
10560
|
+
* @internal
|
|
10561
|
+
*/
|
|
10562
|
+
const initDirectivesForSSR = () => {
|
|
10563
|
+
if (!ssrDirectiveInitialized) {
|
|
10564
|
+
ssrDirectiveInitialized = true;
|
|
10565
|
+
initVModelForSSR();
|
|
10566
|
+
initVShowForSSR();
|
|
10567
|
+
}
|
|
10568
|
+
}
|
|
10569
|
+
;
|
|
10563
10570
|
|
|
10564
10571
|
var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
10565
10572
|
__proto__: null,
|
|
@@ -10567,6 +10574,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
10567
10574
|
hydrate: hydrate,
|
|
10568
10575
|
createApp: createApp,
|
|
10569
10576
|
createSSRApp: createSSRApp,
|
|
10577
|
+
initDirectivesForSSR: initDirectivesForSSR,
|
|
10570
10578
|
defineCustomElement: defineCustomElement,
|
|
10571
10579
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
10572
10580
|
VueElement: VueElement,
|
|
@@ -11048,21 +11056,21 @@ function isCoreComponent(tag) {
|
|
|
11048
11056
|
const nonIdentifierRE = /^\d|[^\$\w]/;
|
|
11049
11057
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
11050
11058
|
const isMemberExpressionNode = (path, context) => {
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11059
|
+
try {
|
|
11060
|
+
let ret = parser.parseExpression(path, {
|
|
11061
|
+
plugins: [...context.expressionPlugins, ...babelParserDefaultPlugins]
|
|
11062
|
+
});
|
|
11063
|
+
if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') {
|
|
11064
|
+
ret = ret.expression;
|
|
11065
|
+
}
|
|
11066
|
+
return (ret.type === 'MemberExpression' ||
|
|
11067
|
+
ret.type === 'OptionalMemberExpression' ||
|
|
11068
|
+
ret.type === 'Identifier');
|
|
11057
11069
|
}
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
}
|
|
11062
|
-
catch (e) {
|
|
11063
|
-
return false;
|
|
11064
|
-
}
|
|
11065
|
-
};
|
|
11070
|
+
catch (e) {
|
|
11071
|
+
return false;
|
|
11072
|
+
}
|
|
11073
|
+
};
|
|
11066
11074
|
const isMemberExpression = isMemberExpressionNode;
|
|
11067
11075
|
function getInnerRange(loc, offset, length) {
|
|
11068
11076
|
const source = loc.source.substr(offset, length);
|
|
@@ -12725,7 +12733,7 @@ function createStructuralDirectiveTransform(name, fn) {
|
|
|
12725
12733
|
}
|
|
12726
12734
|
|
|
12727
12735
|
const PURE_ANNOTATION = `/*#__PURE__*/`;
|
|
12728
|
-
function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssr = false, isTS = false, inSSR = false }) {
|
|
12736
|
+
function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) {
|
|
12729
12737
|
const context = {
|
|
12730
12738
|
mode,
|
|
12731
12739
|
prefixIdentifiers,
|
|
@@ -12735,6 +12743,7 @@ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode
|
|
|
12735
12743
|
optimizeImports,
|
|
12736
12744
|
runtimeGlobalName,
|
|
12737
12745
|
runtimeModuleName,
|
|
12746
|
+
ssrRuntimeModuleName,
|
|
12738
12747
|
ssr,
|
|
12739
12748
|
isTS,
|
|
12740
12749
|
inSSR,
|
|
@@ -12911,7 +12920,7 @@ function generate(ast, options = {}) {
|
|
|
12911
12920
|
};
|
|
12912
12921
|
}
|
|
12913
12922
|
function genFunctionPreamble(ast, context) {
|
|
12914
|
-
const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName } = context;
|
|
12923
|
+
const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context;
|
|
12915
12924
|
const VueBinding = ssr
|
|
12916
12925
|
? `require(${JSON.stringify(runtimeModuleName)})`
|
|
12917
12926
|
: runtimeGlobalName;
|
|
@@ -12951,14 +12960,14 @@ function genFunctionPreamble(ast, context) {
|
|
|
12951
12960
|
// ssr guarantees prefixIdentifier: true
|
|
12952
12961
|
push(`const { ${ast.ssrHelpers
|
|
12953
12962
|
.map(aliasHelper)
|
|
12954
|
-
.join(', ')} } = require("
|
|
12963
|
+
.join(', ')} } = require("${ssrRuntimeModuleName}")\n`);
|
|
12955
12964
|
}
|
|
12956
12965
|
genHoists(ast.hoists, context);
|
|
12957
12966
|
newline();
|
|
12958
12967
|
push(`return `);
|
|
12959
12968
|
}
|
|
12960
12969
|
function genModulePreamble(ast, context, genScopeId, inline) {
|
|
12961
|
-
const { push, newline, optimizeImports, runtimeModuleName } = context;
|
|
12970
|
+
const { push, newline, optimizeImports, runtimeModuleName, ssrRuntimeModuleName } = context;
|
|
12962
12971
|
if (genScopeId && ast.hoists.length) {
|
|
12963
12972
|
ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID);
|
|
12964
12973
|
}
|
|
@@ -12986,7 +12995,7 @@ function genModulePreamble(ast, context, genScopeId, inline) {
|
|
|
12986
12995
|
if (ast.ssrHelpers && ast.ssrHelpers.length) {
|
|
12987
12996
|
push(`import { ${ast.ssrHelpers
|
|
12988
12997
|
.map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`)
|
|
12989
|
-
.join(', ')} } from "
|
|
12998
|
+
.join(', ')} } from "${ssrRuntimeModuleName}"\n`);
|
|
12990
12999
|
}
|
|
12991
13000
|
if (ast.imports.length) {
|
|
12992
13001
|
genImports(ast.imports, context);
|
|
@@ -14255,7 +14264,9 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
|
|
|
14255
14264
|
? createSimpleExpression(keyProp.value.content, true)
|
|
14256
14265
|
: keyProp.exp);
|
|
14257
14266
|
const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
|
|
14258
|
-
if (context.prefixIdentifiers &&
|
|
14267
|
+
if (context.prefixIdentifiers &&
|
|
14268
|
+
keyProperty &&
|
|
14269
|
+
keyProp.type !== 6 /* ATTRIBUTE */) {
|
|
14259
14270
|
// #2085 process :key expression needs to be processed in order for it
|
|
14260
14271
|
// to behave consistently for <template v-for> and <div v-for>.
|
|
14261
14272
|
// In the case of `<template v-for>`, the node is discarded and never
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1513,14 +1513,7 @@ const hmrDirtyComponents = new Set();
|
|
|
1513
1513
|
// Note: for a component to be eligible for HMR it also needs the __hmrId option
|
|
1514
1514
|
// to be set so that its instances can be registered / removed.
|
|
1515
1515
|
{
|
|
1516
|
-
|
|
1517
|
-
? global
|
|
1518
|
-
: typeof self !== 'undefined'
|
|
1519
|
-
? self
|
|
1520
|
-
: typeof window !== 'undefined'
|
|
1521
|
-
? window
|
|
1522
|
-
: {};
|
|
1523
|
-
globalObject.__VUE_HMR_RUNTIME__ = {
|
|
1516
|
+
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
1524
1517
|
createRecord: tryWrap(createRecord),
|
|
1525
1518
|
rerender: tryWrap(rerender),
|
|
1526
1519
|
reload: tryWrap(reload)
|
|
@@ -5282,7 +5275,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
5282
5275
|
return vm;
|
|
5283
5276
|
}
|
|
5284
5277
|
}
|
|
5285
|
-
Vue.version = "3.2.
|
|
5278
|
+
Vue.version = "3.2.19";
|
|
5286
5279
|
Vue.config = singletonApp.config;
|
|
5287
5280
|
Vue.use = (p, ...options) => {
|
|
5288
5281
|
if (p && isFunction(p.install)) {
|
|
@@ -9628,9 +9621,11 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
9628
9621
|
}
|
|
9629
9622
|
}
|
|
9630
9623
|
// template / render function normalization
|
|
9624
|
+
// could be already set when returned from setup()
|
|
9631
9625
|
if (!instance.render) {
|
|
9632
|
-
//
|
|
9633
|
-
|
|
9626
|
+
// only do on-the-fly compile if not in SSR - SSR on-the-fly compliation
|
|
9627
|
+
// is done by server-renderer
|
|
9628
|
+
if (!isSSR && compile && !Component.render) {
|
|
9634
9629
|
const template = (instance.vnode.props &&
|
|
9635
9630
|
instance.vnode.props['inline-template']) ||
|
|
9636
9631
|
Component.template;
|
|
@@ -10851,7 +10846,7 @@ function isMemoSame(cached, memo) {
|
|
|
10851
10846
|
}
|
|
10852
10847
|
|
|
10853
10848
|
// Core API ------------------------------------------------------------------
|
|
10854
|
-
const version = "3.2.
|
|
10849
|
+
const version = "3.2.19";
|
|
10855
10850
|
/**
|
|
10856
10851
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
10857
10852
|
* @internal
|
|
@@ -12602,7 +12597,11 @@ function normalizeContainer(container) {
|
|
|
12602
12597
|
warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
|
12603
12598
|
}
|
|
12604
12599
|
return container;
|
|
12605
|
-
}
|
|
12600
|
+
}
|
|
12601
|
+
/**
|
|
12602
|
+
* @internal
|
|
12603
|
+
*/
|
|
12604
|
+
const initDirectivesForSSR = NOOP;
|
|
12606
12605
|
|
|
12607
12606
|
var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
12608
12607
|
__proto__: null,
|
|
@@ -12610,6 +12609,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12610
12609
|
hydrate: hydrate,
|
|
12611
12610
|
createApp: createApp,
|
|
12612
12611
|
createSSRApp: createSSRApp,
|
|
12612
|
+
initDirectivesForSSR: initDirectivesForSSR,
|
|
12613
12613
|
defineCustomElement: defineCustomElement,
|
|
12614
12614
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
12615
12615
|
VueElement: VueElement,
|
|
@@ -14895,7 +14895,7 @@ function createStructuralDirectiveTransform(name, fn) {
|
|
|
14895
14895
|
}
|
|
14896
14896
|
|
|
14897
14897
|
const PURE_ANNOTATION = `/*#__PURE__*/`;
|
|
14898
|
-
function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssr = false, isTS = false, inSSR = false }) {
|
|
14898
|
+
function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) {
|
|
14899
14899
|
const context = {
|
|
14900
14900
|
mode,
|
|
14901
14901
|
prefixIdentifiers,
|
|
@@ -14905,6 +14905,7 @@ function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode
|
|
|
14905
14905
|
optimizeImports,
|
|
14906
14906
|
runtimeGlobalName,
|
|
14907
14907
|
runtimeModuleName,
|
|
14908
|
+
ssrRuntimeModuleName,
|
|
14908
14909
|
ssr,
|
|
14909
14910
|
isTS,
|
|
14910
14911
|
inSSR,
|
|
@@ -15030,7 +15031,7 @@ function generate(ast, options = {}) {
|
|
|
15030
15031
|
};
|
|
15031
15032
|
}
|
|
15032
15033
|
function genFunctionPreamble(ast, context) {
|
|
15033
|
-
const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName } = context;
|
|
15034
|
+
const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context;
|
|
15034
15035
|
const VueBinding = runtimeGlobalName;
|
|
15035
15036
|
const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
|
|
15036
15037
|
// Generate const declaration for helpers
|
|
@@ -17905,4 +17906,4 @@ Vue.compile = compileToFunction;
|
|
|
17905
17906
|
const { configureCompat: configureCompat$1 } = Vue;
|
|
17906
17907
|
|
|
17907
17908
|
export default Vue;
|
|
17908
|
-
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
17909
|
+
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|