evanw / node-source-map-support

Adds source map support to node.js (for stack traces)
MIT License
2.16k stars 223 forks source link

appears to break webpack-dev-server bundles #108

Open jedwards1211 opened 9 years ago

jedwards1211 commented 9 years ago

Note: I discovered this issue when using Meteor's Velocity test runner, which uses source-map-support. The file velocity_source-map-support.js in the console errors is the Meteor-minified and -bundled version of this package.

Please don't inadvertently prevent code from running if there are any errors loading the source map. I haven't determined exactly how this prevents my webpack bundled code from running, but I have determined that: 1) the webpack bundle loads and attempts to execute the transpiled modules in eval() statements 2) somehow the content of the eval()s never seem to run though 3) when I remove the sanjo:jasmine Meteor package (thus transitively remove velocity:source-map-support), all of my webpack bundled code runs as usual.

image

jedwards1211 commented 9 years ago

I think one solution to this that would be nice for other situations as well is to have the option to polyfill on the local scope instead of monkeypatching any globals. That way the Meteor Velocity package could avoid messing with anything outside its domain.

ghost commented 9 years ago

So the issue specific to this package is that the XMLHttpRequest error is not caught, preventing following code to not execute. The rest of the issue is probably Meteor specific.