You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scripts which come in through HMR lack sourcemaps. This makes them difficult to debug in the browser, and even more so in a debugger that's based on a physical filesystems like VS Code's debugger.
🤔 Expected Behavior
Assets served via HMR should have their own updated sourcemaps for the compiled code.
😯 Current Behavior
I see js be served down the websocket
The code served in this way doesn't have a sourcemap. From a debugger's POV, this is what we see -- we can tell that an HMR happened, but have no mapping so can't help the user debug from their sources.
Sample information sent from the browser for the HMR script:
Include a source map for the HMR module 🙂 Maybe there's already a way to do this somehow, but I don't see it in the HMR docs (and if there is a way, perhaps it should be the default?)
🔦 Context
I work on the VS Code JS debugger. We had a long standing issue (microsoft/vscode-js-debug#843) to ensure parcel hmr is supported, but this is a blocker for that right now.
🙋 feature request
Scripts which come in through HMR lack sourcemaps. This makes them difficult to debug in the browser, and even more so in a debugger that's based on a physical filesystems like VS Code's debugger.
🤔 Expected Behavior
Assets served via HMR should have their own updated sourcemaps for the compiled code.
😯 Current Behavior
I see js be served down the websocket
The code served in this way doesn't have a sourcemap. From a debugger's POV, this is what we see -- we can tell that an HMR happened, but have no mapping so can't help the user debug from their sources.
Sample information sent from the browser for the HMR script:
For comparison, the original bundle parse event, notice the presence of a sourceMapURL:
💁 Possible Solution
Include a source map for the HMR module 🙂 Maybe there's already a way to do this somehow, but I don't see it in the HMR docs (and if there is a way, perhaps it should be the default?)
🔦 Context
I work on the VS Code JS debugger. We had a long standing issue (microsoft/vscode-js-debug#843) to ensure parcel hmr is supported, but this is a blocker for that right now.
💻 Examples
https://github.com/jaredpalmer/react-parcel-example is a sample app, but you can use any
The text was updated successfully, but these errors were encountered: