Skip to content

fix: set compilerOptions.css to 'injected' when emitCss is false#232

Closed
zeroberry wants to merge 1 commit into
sveltejs:masterfrom
zeroberry:master
Closed

fix: set compilerOptions.css to 'injected' when emitCss is false#232
zeroberry wants to merge 1 commit into
sveltejs:masterfrom
zeroberry:master

Conversation

@zeroberry

Copy link
Copy Markdown

Since the default value for compilerOptions.css has been changed to 'external' in Svelte 5, using only emitCss: false results in <style> tag not being included anywhere in the output.

Since the intention of emitCss: false is to inject CSS into JavaScript, I think it's better to set compilerOptions.css to 'injected' when emitCss: false.

@dummdidumm

Copy link
Copy Markdown
Member

Thank you! And sorry for not looking into this - I think #236 is a slightly better solution, so I'm gonna close this.

@dummdidumm dummdidumm closed this Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants