Skip to content

css option doesn't work with ssr #7056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NikolayMakhonin opened this issue Dec 26, 2021 · 1 comment
Closed

css option doesn't work with ssr #7056

NikolayMakhonin opened this issue Dec 26, 2021 · 1 comment

Comments

@NikolayMakhonin
Copy link

Describe the bug

Svelte still add css code to the bundle even though css option is disabled? I need to exclude css from ssr bundle.

see this repl: https://svelte.dev/repl/23b31c4296b043248dabb13cd3930176?version=3.44.3
image

I also get this error on local.

This is from svelte docs:

If true, styles will be included in the JavaScript class and injected at runtime. It's recommended that you set this to `false` and use the CSS that is statically generated, as it will result in smaller JavaScript bundles and better performance.

apparently the behavior of svelte does not match the documentation

Reproduction

https://svelte.dev/repl/23b31c4296b043248dabb13cd3930176?version=3.44.3

Logs

No response

System Info

-

Severity

annoyance

@Conduitry
Copy link
Member

See #3604. If you don't want CSS in the SSR output, just ignore that key in the returned object.

@sveltejs sveltejs locked and limited conversation to collaborators Dec 26, 2021
@sveltejs sveltejs unlocked this conversation Dec 26, 2021
@sveltejs sveltejs locked and limited conversation to collaborators Dec 26, 2021
@sveltejs sveltejs unlocked this conversation Dec 26, 2021
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

No branches or pull requests

2 participants