-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is your feature request related to a problem? Please describe.
I've noticed that running require('source-map-support').install() in a node process with Babel Register started by Yarn Plug'n'Play breaks line numbers in stack traces. I haven't figured out whether it's an issue with PnP or with source-map-support. I'm also not sure about the reasoning behind using source-map-support as a side effect in javascript-obfuscator.
Describe the solution you'd like
I see we are already publishing a few different flavors: index.js, index.cli.js, and index.browser.js. One solution would be to publish another index.no-source-maps.js that excludes require('source-map-support').install() at the start.
Describe alternatives you've considered
We could also use an environment variable to control the require('source-map-support').install() behavior.
Additional context
The workaround right now is to use a Yarn Patch to remove require('source-map-support').install() from javascript-obfuscator.