Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 78a2da3

Browse files
committed
fix: Do not generate style injector code if component has no style
1 parent ed5874d commit 78a2da3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/assembler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ export function assembleFromSource(
345345
/* component normalizer */
346346
${normalizeComponent}
347347
/* style inject */
348-
${!compiler.template.optimizeSSR ? createInjector : ''}
348+
${hasStyle && !compiler.template.optimizeSSR ? createInjector : ''}
349349
/* style inject SSR */
350-
${compiler.template.optimizeSSR ? createInjectorSSR : ''}
350+
${hasStyle && compiler.template.optimizeSSR ? createInjectorSSR : ''}
351351
352352
`
353353

0 commit comments

Comments
 (0)