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.
Is your feature request related to a problem? Please describe.
I've noticed that running
require('source-map-support').install()in anodeprocess 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 withsource-map-support. I'm also not sure about the reasoning behind usingsource-map-supportas a side effect injavascript-obfuscator.Describe the solution you'd like
I see we are already publishing a few different flavors:
index.js,index.cli.js, andindex.browser.js. One solution would be to publish anotherindex.no-source-maps.jsthat excludesrequire('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()fromjavascript-obfuscator.