fix(compiler-core): remove no longer necessary withScopeId import in generated code

This commit is contained in:
Evan You
2021-09-01 11:30:34 -04:00
parent 72d2b26e96
commit 935b4e2210
4 changed files with 10 additions and 17 deletions

View File

@@ -47,7 +47,6 @@ import {
CREATE_TEXT,
PUSH_SCOPE_ID,
POP_SCOPE_ID,
WITH_SCOPE_ID,
WITH_DIRECTIVES,
CREATE_ELEMENT_VNODE,
OPEN_BLOCK,
@@ -380,11 +379,8 @@ function genModulePreamble(
) {
const { push, newline, optimizeImports, runtimeModuleName } = context
if (genScopeId) {
ast.helpers.push(WITH_SCOPE_ID)
if (ast.hoists.length) {
ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID)
}
if (genScopeId && ast.hoists.length) {
ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID)
}
// generate import statements for helpers