Sarah Dayan+ Your Authors @frontstuff_io Staff Software Engineer @Algolia. JavaScript, TypeScript, Vue.js, and CSS developer. TDD and utility-first enthusiast. Speaker and writer. Author of Dinero.js. May. 04, 2020 1 min read + Your Authors

Alright, @webpack Hot Module Replacement question: how do you manually trigger a loader chain?

cc @TheLarkInn @debs_obrien


I have a JS config file that I use in my PostCSS config. When I change this file, I'd like for HMR to pick it up and re-run my Sass pipeline (the one that applies to my /\.(scss)$/ rule). Problem is, since my configuration file is a JS one, the rule doesn't apply to it.

Therefore, when I change it, HMR re-runs the pipeline that applies to my /\.(js|jsx)$/ rule, not the Sass one, because for Webpack, they aren't linked.

Is there a way to either list files as loader dependencies (but not to be handled by it) or to force a loader to run?

If that rings a bell, please let me know, I've been struggling with this for a while and so far nothing seems to fit!


You can follow @frontstuff_io.


Tip: mention @threader_app on a Twitter thread with the keyword “compile” to get a link to it.

Enjoy Threader? Sign up.

Since you’re here...

... we’re asking visitors like you to make a contribution to support this independent project. In these uncertain times, access to information is vital. Threader gets 1,000,000+ visits a month and our iOS Twitter client was featured as an App of the Day by Apple. Your financial support will help two developers to keep working on this app. Everyone’s contribution, big or small, is so valuable. Support Threader by becoming premium or by donating on PayPal. Thank you.

Follow Threader