-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Find a way to preserve line numbers in error messages / stack traces #605
Comments
I strongly believe that source maps is better than no source maps even in the current state. We should definitely file issues with upstream projects, but in the short term I'm not aware of any development teams that intentionally disable source maps in development. |
I'm open to enabling them but not without somebody compiling a list of issues that need to be addressed in other projects for them to work seamlessly. |
Isn't it just the need for a variable name map? i.e. currently dev-tools requires you to see the name of the variables after compilation rather than the name they had in the source code. 95% of the time those are the same thing anyway (unless you add a minifier), but it is still worth pushing to get fixed. |
I think imported names are mangled and this is not 5%. |
Yeah, maybe. At least if Another thing to watch out for is hot reloading support. We don’t have it right now but I’d like to see us be ready to it in the future. I know sourcemap support for it was fixed for
I’m not sure this was my experience with destructuring (or some other common ES features) but worth double checking. Imports are confusing too, I wish there was a way around that while preserving ES modules semantics. |
Not having source maps is definitely problematic. Chrome chrashes on my Macbook Pro if I try to do searches and add breakpoints in bundle.js. |
... and when it actually works, it's unintelligible garble due to the eval thingee. |
Can you put breakpoints in the modules instead? |
@gaearon I don't understand. In my installation ("react-scripts": "0.6.1"), everything is just one big bundle.js. |
@gaearon oh, I get what you mean now, I have to expand into the webpack:// thingee. That works! |
does/will this issue cover also line numbers in test/jest stack traces? |
We have sourcemaps now so probably not relevant anymore. |
Seeing incorrect line numbers in stack traces breaks workflow too much.
We could try to either use line preserving code transformations (does Babel support that?) or enable more advanced Webpack's devtool (
cheap-module-eval-source-map
).The text was updated successfully, but these errors were encountered: