Cant import scss from node_modules #3574
Unanswered
DLOspreyFs
asked this question in
Troubleshooting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to make the case for switching over to snowpack for a greenfield project, however we currently use a common styles package in all of our applications which I can't seem to successfully import.
The styles are hosted at a private npm org, at the top level we have a scss file (resets.scss) which is imported into the index.tsx
@import "~@ospreyfs/styles/functions;
Doing so gives me the following error
It appears that snowpack doesn't look in node_modules and can't see the file, I was able to get around this by using '../../node_modules/@ospreyfs/styles' but this feels a little hacky and I'd much rather be able to import from node_modules into a scss file.
Beta Was this translation helpful? Give feedback.
All reactions