HMR stops updating after first error, reports as unaccepted module
See original GitHub issue- Operating System: Windows 10
- Node Version: 10.x
- NPM Version: 9.6.0
- webpack Version: 4.35.3
- mini-css-extract-plugin Version: 0.8.0
Expected Behavior
Given is a Less file styles.less
, in which we accidentally introduce an error and then save.
HMR attempts an update and it shows the errored compilation.
After fixing the error, HMR should correctly load the fixed compiled CSS.
Actual Behavior
Instead of loading the fixed compiled CSS, HMR reports Ignored an update to unaccepted module ./styles.less
and fails to update.
After having received a failed compilation, the module will continue to not accept hot updates until having manually reloaded the web page.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Ignored an update to unaccepted module - Stack Overflow
So, only write a HMR interface in index.js don't work to the second situation and it throws Ignored an update to unaccepted module...
Read more >Hot Module Replacement - webpack
Hot Module Replacement (or HMR) is one of the most useful features offered by webpack. It allows all kinds of modules to be...
Read more >A Deep Dive into Hot Module Replacement with Webpack ...
Part 2: Handling Hot Updates with the module.hot API. In the first blog post of the HMR series, we discussed the four stages...
Read more >Basic Features: Fast Refresh - Next.js
Next.js' Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components.
Read more >gaearon/react-hot-loader - Gitter
Haha, good, jumping into Hot Loading is a lot of trial and errors anyway. ... I wanted to get hot module replacement working,...
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
@evilebottnawi
The testcase is available now as mini-css-extract-plugin-hmr-testcase.
The readme contains a few manual instructions. (Sorry, couldn’t get that to work automated.) It also contains some npm tasks to swap between the package version of
mini-css-extract-plugin
and the fork that I patched. And it contains a short rundown of what/how/why changes are applied to the forked plugin to make error-recovery/resilience work.If you want I can also open a PR from the fork.
No problem. Stuff like this happens. Pretty sure that the like of Webpack 5 puts a lot of work on your plate.