You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can replicate this, but there is a bit of nuance as follows (all with css: "injected"):
Using @import "./test.css"; in component style results in the output js file still including the import statement but not copying the css file over
Using import "./test.css"; in the component script results in the test.css file being copied over but no import call from the component css
Using both @import and import results in a functioning component, with the imported css in an external file
None of these are exactly what you are looking for. Since Svelte deals with the css -> css-in-js transformation internally, there is limited ability for a bundler to interfere. I'll continue to think about possible solutions.
If I set compilerOptions.css to
true
(or `inject with Svelte 4), it still generates a CSS file and doesn't include it in the Javascript file.To Reproduce
Steps to reproduce the behavior:
Import a css file into a svelte file
Expected behavior
The CSS is included into the JS and get's injected
Environment:
The text was updated successfully, but these errors were encountered: