CSS Import resolution problems #944
Unanswered
alexkreidler
asked this question in
Q&A
Replies: 2 comments
-
Well I found 2 workarounds: For both I add the following to "mount": {
"node_modules/react-mosaic-component/dist/styles": "/ext-styles"
} One option is to add @import url("/ext-styles/react-mosaic-component.css"); to any local css file that's used (and imported in JS) in your project ( The second option is to add to Snopack Config: "alias": {
"@mosaic": "/ext-styles",
} And then do: import "@mosaic/react-mosaic-component.css"; Obviously I'd like to figure out what the underlying problem is though. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That's strange, I don't see that file existing in the package, which would explain why Snowpack is having trouble: https://unpkg.com/react-mosaic-component@4.1.1/dist/styles/react-mosaic-component.css |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I"m trying to import some css as follows:
I'm getting this error:
Even when I add the
install
field to my snowpack.config.js, I get the same error.The generated code from view-source looks like:
Here's a relevant except of the
package.json
of the dependency:When I'm only importing JS from the ES Module, everything works fine:
import { Mosaic } from "react-mosaic-component";
Beta Was this translation helpful? Give feedback.
All reactions