Cache isn't refreshed when multiple linked @use is used across more than 2 files.@snowpack/plugin-sass #2668
Replies: 4 comments
-
I can confirm this bug is happening. I ran into the same problem using |
Beta Was this translation helpful? Give feedback.
-
It appears that only the first level of imports are scanned in // During development, we need to track changes to Sass dependencies.
if (isDev) {
const sassImports = scanSassImports(contents, filePath, fileExt);
sassImports.forEach((imp) => addImportsToMap(filePath, imp));
} This also likely explains why when using |
Beta Was this translation helpful? Give feedback.
-
I believe this has been fixed by #2792. |
Beta Was this translation helpful? Give feedback.
-
I'm having the same problem when referring to parent directory in an import @import '../common-ui/styles/reset'; |
Beta Was this translation helpful? Give feedback.
-
I tried rephrasing this multiple times but I guess I'm just bad at writing English. Sorry in advance.
How to reproduce:
@use "b";
in a.scss and@use "c";
in b.scss.The change is detected and the HMR message is sent to the browser. But since the cache isn't being invalidated nothing will be rebuilt until you update a.scss or b.scss.
The cache is persisted so simply restarting isn't going to fix the problem. You'll have to run
snowpack dev --refresh
to clear the cache.Beta Was this translation helpful? Give feedback.
All reactions