Skip to content

Commit cef446a

Browse files
committed
fix(compiler-sfc): vapor attribute on template tag
1 parent b2259a5 commit cef446a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/compiler-sfc/src/parse.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export function parse(
186186
source,
187187
false,
188188
) as SFCTemplateBlock)
189+
descriptor.vapor ||= !!templateBlock.attrs.vapor
189190

190191
if (!templateBlock.attrs.src) {
191192
templateBlock.ast = createRoot(node.children, source)
@@ -210,11 +211,8 @@ export function parse(
210211
break
211212
case 'script':
212213
const scriptBlock = createBlock(node, source, pad) as SFCScriptBlock
214+
descriptor.vapor ||= !!scriptBlock.attrs.vapor
213215
const isSetup = !!scriptBlock.attrs.setup
214-
const isVapor = !!scriptBlock.attrs.vapor
215-
if (isVapor) {
216-
descriptor.vapor = true
217-
}
218216
if (isSetup && !descriptor.scriptSetup) {
219217
descriptor.scriptSetup = scriptBlock
220218
break

0 commit comments

Comments
 (0)