We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
<template functional>
1 parent 3ea6869 commit 4670763Copy full SHA for 4670763
packages/compiler-sfc/src/parse.ts
@@ -155,6 +155,18 @@ export function parse(
155
false
156
) as SFCTemplateBlock)
157
templateBlock.ast = node
158
+
159
+ // warn against 2.x <template functional>
160
+ if (templateBlock.attrs.functional) {
161
+ const err = new SyntaxError(
162
+ `<template functional> is no longer supported in Vue 3, since ` +
163
+ `functional components no longer have significant performance ` +
164
+ `difference from stateful ones. Just use a normal <template> ` +
165
+ `instead.`
166
+ ) as CompilerError
167
+ err.loc = node.props.find(p => p.name === 'functional')!.loc
168
+ errors.push(err)
169
+ }
170
} else {
171
errors.push(createDuplicateBlockError(node))
172
}
0 commit comments