wip: correctly resolve component in setup inline mode

This commit is contained in:
Evan You 2020-11-10 17:36:06 -05:00
parent 3019508e75
commit 4977526a2b

View File

@ -257,10 +257,12 @@ export function resolveComponentType(
bindings[(tagFromSetup = camelize(tag))] === 'setup' ||
bindings[(tagFromSetup = capitalize(camelize(tag)))] === 'setup')
) {
return `$setup[${JSON.stringify(tagFromSetup)}]`
return context.inline
? tagFromSetup
: `$setup[${JSON.stringify(tagFromSetup)}]`
}
// 4. user component (resolve)
// 5. user component (resolve)
context.helper(RESOLVE_COMPONENT)
context.components.add(tag)
return toValidAssetId(tag, `component`)