fix(compiler-sfc): should also expose regular script block bindings when <script setup> is used
close #4369
This commit is contained in:
@@ -827,6 +827,13 @@ export function compileScript(
|
||||
)
|
||||
}
|
||||
}
|
||||
} else if (
|
||||
(node.type === 'VariableDeclaration' ||
|
||||
node.type === 'FunctionDeclaration' ||
|
||||
node.type === 'ClassDeclaration') &&
|
||||
!node.declare
|
||||
) {
|
||||
walkDeclaration(node, setupBindings, userImportAlias)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user