babel-register aleary use source-map-support!
See original GitHub issueI want to use the source map with universal-webpack and babel, but babel-register aleardy use source-map-support
, which change the node default error handler. If I import 'source-map-support/register'
, it will change it twice, which cause the source map output the wrong path.
And I find out when babel-register use source-map-support
, it map from the memory running code to the complied file, not from complied file to all source files. How can I generate right source map? @catamphetamine
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Source map weirdness when using @babel/register . #1899
In the second scenario it may just be that @babel/register pulls in an outdated source-map-support , which itself pulls in an outdated source-...
Read more >node.js - @babel/register support source maps on runtime
I understand that source-map-support does not work. VSCode debugging goes well. The editor see and understand source maps. Help me to make ...
Read more >babel-plugin-source-map-support
An easy way to limit the plugin's scope to development/test builds is to use Babel's env option, e.g.:
Read more >Using Node.js sourcemaps with Node.js and Babel
Enable sourceMaps when transpiling code using Babel. · Use babel-plugin-source-map-support to override stack trace. · Use RewriteFrames plugin to ...
Read more >babel-plugin-source-map-support - npm package
A Babel plugin which automatically makes stack traces source-map aware For more information about how to use this package see README.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
babel-register
usesource-map-support
by default, and compile code in runtime, which will make node error stack out of order. you can debug inbabel-register
’s node_modulessource-map-support
’ssource-map-support.js
file, whereprepareStackTrace
will take care of the nativeprepareStackTrace
function and process compiled file to the source file.but if you disable
babel-register
and enablesource-map-support
to the top ofserver.js
, and run theserver.js
file, thenthrow new Error('aaa')
, the output error stack log will be right. but was wrong when enablebabel-register
and disablesource-map-support
.@catamphetamineI see, so
babel-register
has its own source maps generated which screws line numbers up. Removingbabel-register
from the readme then. Thx.