Webpack Hot Module Replacement (HMR) doesn't update sourcemap
See original GitHub issueHi, 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:
- Created 7 years ago
- Comments:13 (2 by maintainers)
Per my test, Alt-R in DevTool solution doesn’t work with
'cheap-module-eval-source-map'
, but works with'cheap-module-source-map'
.@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”.