-
Notifications
You must be signed in to change notification settings - Fork 43
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
Enable sourcemaps in dev #457
base: main
Are you sure you want to change the base?
Conversation
@@ -8,7 +8,7 @@ const path = require('path') | |||
const isDevelopment = process.env.NODE_ENV !== 'production' | |||
module.exports = { | |||
entry: './src/index.tsx', | |||
devtool: 'source-map', | |||
devtool: isDevelopment ? 'eval-source-map' : 'source-map', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I remember having no issues with debugging Unovis from the dev app. Was the error in the console also leading to the obfuscated bundle?
Also the source-map
option generally produces better results that 'eval-source-map' and is more computationally expensive to calculate. Do you know why the eval-source-map
works here better here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change changes the error message from pointing to bundle.js
to pointing to something from node_modules
. That's arguably an improvement, but actually it's not that much better, since we still are not getting the line numbers for the original error. Happy not to merge this, maybe it's just a weird case I'm dealing with. Thanks for reviewing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My setup:
- Node v22.8.0
- Mac
I wonder if this is not a problem for others?
Closes #456
Before:
After: