mirror of https://github.com/vuejs/core.git
fix(ssr): avoid ast.helpers duplication (#6664)
This commit is contained in:
parent
b1817fe9ee
commit
57ffc3e546
|
@ -48,9 +48,10 @@ export function ssrCodegenTransform(ast: RootNode, options: CompilerOptions) {
|
||||||
context.body.push(
|
context.body.push(
|
||||||
createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`])
|
createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`])
|
||||||
)
|
)
|
||||||
Array.from(cssContext.helpers.keys()).forEach(helper =>
|
Array.from(cssContext.helpers.keys()).forEach(helper => {
|
||||||
|
if (!ast.helpers.includes(helper))
|
||||||
ast.helpers.push(helper)
|
ast.helpers.push(helper)
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const isFragment =
|
const isFragment =
|
||||||
|
|
Loading…
Reference in New Issue