10000 fix: support vapor template-only component · unplugin/unplugin-vue@b5b9786 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5b9786

Browse files
committed
fix: support vapor template-only component
ref vitejs/vite-plugin-vue@95be153
1 parent b990d51 commit b5b9786

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,9 @@ async function genScriptCode(
339339
code: string
340340
map: RawSourceMap | undefined
341341
}> {
342-
let scriptCode = `const ${scriptIdentifier} = {}`
342+
// @ts-expect-error TODO remove when 3.6 is out
343+
const vaporFlag = descriptor.vapor ? '__vapor: true' : ''
344+
let scriptCode = `const ${scriptIdentifier} = { ${vaporFlag} }`
343345
let map: RawSourceMap | undefined
344346

345347
const script = resolveScript(

0 commit comments

Comments
 (0)
0