message:`Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,
message:(key)=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`,
message:`v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,
message:`v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`,
message:`filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`,
[1]:"CDATA section is allowed only in XML context.",
[2]:"Duplicate attribute.",
[3]:"End tag cannot have attributes.",
[4]:"Illegal '/' in tags.",
[5]:"Unexpected EOF in tag.",
[6]:"Unexpected EOF in CDATA section.",
[7]:"Unexpected EOF in comment.",
[8]:"Unexpected EOF in script.",
[9]:"Unexpected EOF in tag.",
[10]:"Incorrectly closed comment.",
[11]:"Incorrectly opened comment.",
[12]:"Illegal tag name. Use '<' to print '<'.",
[13]:"Attribute value was expected.",
[14]:"End tag name was expected.",
[15]:"Whitespace was expected.",
[16]:"Unexpected '<!--' in comment.",
[17]:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
[18]:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
[19]:"Attribute name cannot start with '='.",
[21]:"'<?' is allowed only in XML context.",
[20]:`Unexpected null character.`,
[22]:"Illegal '/' in tags.",
// Vue-specific parse errors
[23]:"Invalid end tag.",
[24]:"Element is missing end tag.",
[25]:"Interpolation end sign was not found.",
[27]:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
[26]:"Legal directive name was expected.",
// transform errors
[28]:`v-if/v-else-if is missing expression.`,
[29]:`v-if/else branches must use unique keys.`,
[30]:`v-else/v-else-if has no adjacent v-if or v-else-if.`,
[31]:`v-for is missing expression.`,
[32]:`v-for has invalid expression.`,
[33]:`<template v-for> key should be placed on the <template> tag.`,
[34]:`v-bind is missing expression.`,
[52]:`v-bind with same-name shorthand only allows static argument.`,
[35]:`v-on is missing expression.`,
[36]:`Unexpected custom directive on <slot> outlet.`,
[37]:`Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
[38]:`Duplicate slot names found. `,
[39]:`Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
[40]:`v-slot can only be used on components or <template> tags.`,
[41]:`v-model is missing expression.`,
[42]:`v-model value must be a valid JavaScript member expression.`,
[43]:`v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
[44]:`v-model cannot be used on a prop, because local prop bindings are not writable.
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
[45]:`Error parsing JavaScript expression: `,
[46]:`<KeepAlive> expects exactly one child component.`,
[51]:`@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
// generic errors
[47]:`"prefixIdentifiers" option is not supported in this build of compiler.`,
[48]:`ES module mode is not supported in this build of compiler.`,
[49]:`"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
[50]:`"scopeId" option is only supported in module mode.`,
`<${node.tag}> cannot be child of <${context.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`
);
error.loc=node.loc;
context.onWarn(error);
}
};
constDOMNodeTransforms=[
transformStyle,
...[transformTransition,validateHtmlNesting]
];
constDOMDirectiveTransforms={
cloak:noopDirectiveTransform,
html:transformVHtml,
text:transformVText,
model:transformModel,
// override compiler-core
on:transformOn,
// override compiler-core
show:transformShow
};
functioncompile(src,options={}){
returnbaseCompile(
src,
extend({},parserOptions,options,{
nodeTransforms:[
// ignore <script> and <tag>
// this is not put inside DOMNodeTransforms because that list is used
// by compiler-ssr to generate vnode fallback branches