question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HMR not reloading SCSS

See original GitHub issue

I have Laravel Mix setup on a project and it’s working as expected. When running in hmr mode I can see in the console that it’s recompiling each time I change a SCSS or JS file.

However, it’s only reloading the javascript changes. If it’s a SCSS file that’s changed although HMR is triggered on the page, it says no changes have been detected.

[WDS] App hot update...
app.js:4282 [HMR] Checking for updates on the server...
app.js:9069 [HMR] Nothing hot updated.
app.js:4264 [HMR] App is up to date.

If I reload the web page then I see my SCSS changes.

Is this broken, or expected behaviour? I’d love to see my SCSS changes as well.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:27 (8 by maintainers)

github_iconTop GitHub Comments

11reactions
JeffreyWaycommented, Jan 18, 2017

It won’t work right now for regular Sass files. The HMR feature is specifically for Vue and .vue components.

2reactions
amcsicommented, Jul 18, 2018

What I was able to do to get hot reloading of app.scss to work (with VueJS) was to do this in my root .vue component:

<style lang="scss">
    @import 'resources/assets/sass/app.scss';
</style>

Notice lang="scss" and no scoped.

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack 5 does not HMR (hot reload) on style changes
Webpack stopped hot reloading on any style changes (CSS, scss). Even importing styles into .ts/.js files seems to not doing much (it reloads...
Read more >
Webpack 5 HMR not working for CSS updates #3064 - GitHub
Make whatever changes to SCSS files. Nothing changes until refresh. ... Check browser console and network requests on each update. hmr-console
Read more >
HMR: See Changes without Reloading - SymfonyCasts
Back in our editor, at the bottom, let's make a CSS change: I'm pretty sure a designer just told me that the hover...
Read more >
MiniCssExtractPlugin - webpack
The mini-css-extract-plugin supports hot reloading of actual css files in development. Some options are provided to enable HMR of both standard stylesheets and ......
Read more >
Webpack's Hot Module Replacement Feature Explained
HMR allows you to exchange, add, or remove JavaScript modules while the application is running, all without having to reload the browser.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found