plugin-sass resolves imports differently in dev and build, making dev fail #2108
Unanswered
Snugug
asked this question in
Troubleshooting
Replies: 1 comment
-
I found that in dev only |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Found this problem while trying to troubleshoot #2090. It appears that
@snowpack/plugin-sass
, when doing a build, is able to correctly find relative files (@import 'components/foo'
instead of@import './components/foo'
) and is able to make use of Sass Load Paths to find files in other places, but duringdev
, both fail inside ofesinstall
(esinstall/lib/index.js:159:15
). My assumption is that it's attempting to look up the an installed Node modulecomponents
and the filefoo
within there instead of handling the import through Sass, and thus failing. I think my other discussion topic, supporting aliases in Sass files, may solve this, but I'm not sure if it'll solve it for both dev and build, or only fix it for dev and then break build because it does seem like there are two different paths happening.Beta Was this translation helpful? Give feedback.
All reactions