Closed nuclearape closed 5 years ago
Sorry, but I don't think this is a duplicate of #178 - that appears to be a problem arrising from a conflict with sass-graph and node-sass-chokidar / chokidar. I don't use any of these in my build (tbh I've never heard of them).
As you can see from my dependencies all I have running on top of npm is node-sass, breakpoint-sass and your magic-importer. I can remove breakpoint-sass and I get the same result.
Am I missing something? Or, is there anymore info I can give you that would warrant re-opening this and investigating?
It's not the exact same problem but is the exact same reason why it doesn't work.
node-sass
uses sass-graph
(https://github.com/sass/node-sass/blob/master/package.json#L70) to resolve all @import
statements in your codebase in order to build a tree of all files it has to watch for changes. But sass-graph
can't resolve glob strings so it does ignore your import statements and all files which are imported with the help of node-sass-magic-importer
.
There are two ways around this. Either you open an issue / pull request in https://github.com/xzyfer/sass-graph to add support for custom importers. Or you use the approach I've described in https://github.com/maoberlehner/node-sass-magic-importer/issues/178#issuecomment-424271452
Thx!
When I modify a partial inside a globbed folder a fresh style.css file isn't rendered.
My file structure looks like:
My style.scss looks like:
If i then make an edit to _partial.scss nothing happens. If I rewrite my style.scss like this...
...and make an edit to _partial.scss a fresh style.css is rendered.
My package.json is like this:
and I start watching with
npm run scss