CSS imports from node_modules packages aren't being resolved. #1384
-
I've been migrating an app from webpack to snowpack, and came accross this issue. As is stated in the docs:
I removed the @, but when I run This is the error I get:
This is the
And this is my
Please help! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 8 replies
-
I have a similar problem, it seems snowpack is not resolving/parsing non-js content: |
Beta Was this translation helpful? Give feedback.
-
On a blank setup ( |
Beta Was this translation helpful? Give feedback.
-
Thanks y'all for reporting, I was able to reproduce something similar in #1417. It looks like package imports weren't being resolved properly when the CSS file was imported from a JS file. aae7908 reorders the steps so that we resolve the CSS file first before handling the JS proxy file. |
Beta Was this translation helpful? Give feedback.
-
I have an issue that might be related to this.
The @ tailwind directive is ignored. But if I put the exact same content in src/ and import that, the tailwind directive is correctly applied. Is this an issue with postcss or snowpack? (I have postcss installed as a plugin) |
Beta Was this translation helpful? Give feedback.
-
I am using snowpack without postcss and having problems using the When using
in the console and
in the browser. When importing each file from my JS the errors are similar, but the paths are different:
|
Beta Was this translation helpful? Give feedback.
-
I've stumbled upon this having the same issue importing CSS from a svelte-js file that lies in the node_modules folder. I used svelte-filepond module that imports a css file itself.
The css import of the filepond module is not being resolved and shows up in the browser as This produces a 404 error since the import cannot reach the node_modules folder which lies outside the public folder. |
Beta Was this translation helpful? Give feedback.
-
I am experiencing this issue right now |
Beta Was this translation helpful? Give feedback.
Thanks y'all for reporting, I was able to reproduce something similar in #1417. It looks like package imports weren't being resolved properly when the CSS file was imported from a JS file. aae7908 reorders the steps so that we resolve the CSS file first before handling the JS proxy file.