dart-sass icon indicating copy to clipboard operation
dart-sass copied to clipboard

Possible issue the --load-path

Open panoply opened this issue 2 years ago • 1 comments

Version 1.63 seems to have trouble with --load-path flag and --watch. SASS will not recompile on change. Take the following:

sass --watch --load-path=node_modules/  src/styles/stylesheet.scss public/style.css

In stylesheet.scss

@import "bootstrap/scss/bootstrap";
@import "dir/custom-file"

When SASS is invoked in watch mode then changes to custom-file (as an example) will not trigger re-compile.

Additional Information

I leverage PNPM which means dependencies are symlinked. Unsure if this might be causing the conflict, however it is important to note that running without --watch flag will build as intended.

Current Workaround

Explicitly defining the paths, eg:

@import "../../node_modules/bootstrap/scss/bootstrap";
@import "dir/custom-file"

Will result in behaviour to work as intended.

panoply avatar Jun 13 '23 10:06 panoply

Sorry for the delayed reply.

Can you try running with the --poll option? File watching is dependent on the platform's implementation, so there's usually not anything we can do to fix issues like this, but --poll should work reliably as a fallback.

jathak avatar Sep 05 '23 20:09 jathak