metalsmith-sass
metalsmith-sass copied to clipboard
Modifying a partial file does not trigger a re-compile
I have a _partial.scss file imported in my main app.scss file. Modifying and saving _partial.scss does not trigger the SCSS to be re-compiled, but saving app.scss does.
What are you using to monitor changes and re-compile? Sounds like something metalsmith-sass doesn't handle by itself :)
I am using metalsmith-watch, but I didn't think that was causing the re-compile because it doesn't re-compile the CSS when I modify an HTML file, but it does when I modify an SCSS file that doesn't start with _.
I'm not sure where to file this bug.
Could this be sass that's doing the monitoring?
No worries, I'm sure we can track it down!
Can you share your metalsmith settings?
I ran into this problem today. The issue is in the configuration of metalsmith-watch. Adding the middle line in the 'paths' array triggers the reloading for all sass/scss files:
.use(watch({
paths: {
"${source}/**/*": true,
"${source}/sass/*": "**/*.scss",
"templates/**/*": "**/*.md",
},
livereload: true,
}))
This is still an issue I think. Changes are detected, but changes are being updated in css files.
[metalsmith-watch] ✔︎ src/scss/partials/_posts-list.scss changed
[metalsmith-watch] - Updating 1 file...
[metalsmith-watch] ✔︎ 13 files reloaded
There's an open issue on the metalsmith-watch repo too. Any ideas what to do?
any progress on this?