workflow(sfc-playground): pass along analyzed bindings when compiling template
This commit is contained in:
parent
4d2853ef57
commit
7ab519cc96
@ -140,9 +140,10 @@ async function compileFile({ filename, code, compiled }: File) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// script
|
// script
|
||||||
|
let compiledScript
|
||||||
if (descriptor.script || descriptor.scriptSetup) {
|
if (descriptor.script || descriptor.scriptSetup) {
|
||||||
try {
|
try {
|
||||||
const compiledScript = compileScript(descriptor, {
|
compiledScript = compileScript(descriptor, {
|
||||||
id,
|
id,
|
||||||
refSugar: true,
|
refSugar: true,
|
||||||
inlineTemplate: true
|
inlineTemplate: true
|
||||||
@ -172,7 +173,10 @@ async function compileFile({ filename, code, compiled }: File) {
|
|||||||
id,
|
id,
|
||||||
scoped: hasScoped,
|
scoped: hasScoped,
|
||||||
slotted: descriptor.slotted,
|
slotted: descriptor.slotted,
|
||||||
isProd: false
|
isProd: false,
|
||||||
|
compilerOptions: {
|
||||||
|
bindingMetadata: compiledScript && compiledScript.bindings
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if (templateResult.errors.length) {
|
if (templateResult.errors.length) {
|
||||||
store.errors = templateResult.errors
|
store.errors = templateResult.errors
|
||||||
|
Loading…
Reference in New Issue
Block a user