-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Webpack Hot Module Replacement (HMR) doesn't update sourcemap #2478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As far as I know it's a browser bug. |
Yes, I agree. I just found a comment mentioning the same issue (http://survivejs.com/webpack_react/developing_with_webpack/#comment-2534457458):
Webpack centered dev & build process is important to our web app development, while the sourcemap is an important tool for JS debugging. Could you keep this issue open for a while, so that I could revisit after more research? Thanks. I'm now searching for possible bugs in chromium, hope to find some clues there. |
Just submitted a comment to a Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=438251#c21 |
My experience has been that browser's cache the source map based on the filename that the source map indicates. In the context of another build tool, I worked around this problem by ensuring that the source map always references a hashed version of the filename, eg: One downside to this approach is that the devtools never cleans up the old source maps until you refresh the page. Besides any concerns about perf or garbage collection, it does make navigating the Jumping to the source definition from rulesets, errors & logs still function as expected though, which is the primary use-case after all. |
@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". |
Per my test, Alt-R in DevTool solution doesn't work with |
Alt-R in DevTool solution works again in Version 53.0.2762.0 canary (64-bit). Not sure what's happening. |
Closing as this has been acknowledged by the Chrome team. alt-r it is then for now. |
I found a way that set devtool: 'eval', and it will reload the source-map automatically, but the source-map code is generated code. I think this way is better for me. |
Still have this issue (source maps not updating with hot module replacement) with webpack 2.3.3 has anyone a working example ? |
Any solution yet besides Alt + R? |
Did anyone find a solution ??? for me it's working on FF but not in Chrome ¬¬ |
alt + r for dev tool update webpack/webpack#2478
Got it working by setting You can always try with the command |
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
anddevtool: 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.
The text was updated successfully, but these errors were encountered: