Auto-compile imported scss files in style tags when they have changed
See original GitHub issueConsider this code example
<style lang='scss'>
@import '/src/css/variables.scss';
$border-dark: rgba($base-color, 0.88);
.alert {
border: 1px solid $border-dark;
}
</style>
Currently when I make changes to the variables.scss
no components that import it update or reflect its changes. I have to save each component that imports it. Is there a way to get this working currently or is this a feature that needs building? Basically to recompile all affected files when imported .scss files are changed?
I’m currently using Svelte 3 and Parcel for my build along with a svelte.config.js
file the contents of which look like this:
const sveltePreprocess = require('svelte-preprocess');
module.exports = {
preprocess: sveltePreprocess()
};
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Changes to imported SCSS in style tag is not triggering a ...
Hey there, I feel like I'm missing something, but I have a pretty common use case where I'm importing a SCSS file into...
Read more >Sass watch is detecting changes but not compiling to css
I am using Bourbon so all my .scss and .sass files are imported via mixins. ex. >>> Sass is watching for changes. Press...
Read more >Sass: @import
As a convention, Sass files that are only meant to be imported, not compiled on their own, begin with _ (as in _code.scss...
Read more >How to Use Sass with CSS Modules in Next.js
CSS Modules are essentially CSS files that, when imported into ... I wanted to change only a <strong> element nested in a title,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok… it works in the test repro I made for you, so the error I’m getting must be from another package I’m using in my main project! So all good! Amazing work! Thank you so much! 👍 💯
Ahh… sorry, I was a bit lost in the production file since it’s minified.
This is the log of
result.stats
after runningnpm run dev
:After making a change in the
scss
file nothing happens in the CLI though.Finally I’ve used node sass with Vue and React bundles using webpack dev server without any issues when the files are updated.