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.

Webpack Hot Module Replacement (HMR) doesn't update sourcemap

See original GitHub issue

Hi, Webpack team,

I’ve got HMR working well with babel-loader, react-hot-loader, webpack-dev-middleware and webpack-hot-middleware. As expected, the React component updates in browser after an incremental build. However, the sourcemap for JSX files (or other ES6 file) is not reflecting to the source code change, instead it stays unchanged. I’ve tried devtool: eval-cheap-module-source-map and devtool: cheap-module-inline-source-map, neither one helps. I’m using Webpack v1.13.0.

Googling shows there are other one having the same issue: http://stackoverflow.com/questions/34723571/webpack-hot-module-replacement-hmr-sourcemaps-not-updated-new-code-not-visib

Sure I can correct it with a manual reload, but it would be great if it can update along with HMR.

Thanks for any comments.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
evisongcommented, May 19, 2016

Per my test, Alt-R in DevTool solution doesn’t work with 'cheap-module-eval-source-map', but works with 'cheap-module-source-map'.

8reactions
evisongcommented, May 16, 2016

@markfinger You’re right, there’ll be noises when every past versions of sourcemaps co-exist.

According to Chromium team (https://bugs.chromium.org/p/chromium/issues/detail?id=438251#c22), a quick workaround is to manually press “alt-r which reloads the DevTools”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack hot module replacement (HMR) sourcemaps not ...
There is an issue with HMR and updating the source maps in the DevTools. Typically, the source maps are cached by the browsers...
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 >
Webpack's Hot Module Replacement Feature Explained
When a hot update failed to replace the code in the browser, the HMR runtime will let webpack-dev-server know. The webpack-dev-server will then ......
Read more >
Webpack dev server, Hot reload and source maps - Medium
In oder for hot reload to work with Webpack-dev-server you should tell ... is enabled but it doesn't know how to hot reload...
Read more >
Hot Module Replacement - SurviveJS
Hot Module Replacement (HMR) builds on top of the WDS. ... it so that it lets webpack control module generation as otherwise, HMR...
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