false
) as SFCTemplateBlock)
templateBlock.ast = node
+
+ // warn against 2.x <template functional>
+ if (templateBlock.attrs.functional) {
+ const err = new SyntaxError(
+ `<template functional> is no longer supported in Vue 3, since ` +
+ `functional components no longer have significant performance ` +
+ `difference from stateful ones. Just use a normal <template> ` +
+ `instead.`
+ ) as CompilerError
+ err.loc = node.props.find(p => p.name === 'functional')!.loc
+ errors.push(err)
+ }
} else {
errors.push(createDuplicateBlockError(node))
}