fix(compiler-sfc): do not resolve assets from setup bindings
when not using script setup fix #3270, fix #3275
This commit is contained in:
@@ -1586,6 +1586,12 @@ function analyzeScriptBindings(ast: Statement[]): BindingMetadata {
|
||||
|
||||
function analyzeBindingsFromOptions(node: ObjectExpression): BindingMetadata {
|
||||
const bindings: BindingMetadata = {}
|
||||
// #3270, #3275
|
||||
// mark non-script-setup so we don't resolve components/directives from these
|
||||
Object.defineProperty(bindings, '__isScriptSetup', {
|
||||
enumerable: false,
|
||||
value: false
|
||||
})
|
||||
for (const property of node.properties) {
|
||||
if (
|
||||
property.type === 'ObjectProperty' &&
|
||||
|
||||
Reference in New Issue
Block a user