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
Added new skipCss option #109
Conversation
I'm not set on the |
Sounds good to me. This refs sveltejs/svelte#7270 then.
No worries |
Svelte will get this soon, so I think this project needs to be adjusted for the new possible options as well? And the PR will likely become unnecessary. |
I've been tracking that PR, great to see some progress! And yeah, the Svelte PR will end up superseding this. I'll leave this open till it gets released though. Yes, esbuild-svelte will need updates as people start migrating away from the boolean value. |
Svelte released |
Fixed in Svelte and released as esbuild-svelte |
This is WIP (docs, tests) but I wanted to get your approval.
I've added Svelte support to Harp, my favorite static website generator (http://harpjs.com/, sintaxi/terraform#154)
There's one issue though: the generated static HTML (completely without JavaScript) is embedding the generated CSS. This works as expected. However, now if a component needs to be hydrated then the client side JS includes the CSS again (with
css: true
), which is entirely unnecessary. Usingcss: false
does not work, because compilation happens entirely in-memory (using esbuildstdin
). So even if we ignore the fact that I don't need CSS at all for the client bundle, it also wouldn't work becausestdin
cannot import the external CSS file. There's no filesystem.So I need an option to compile a Svelte component without any CSS whatsoever.