X Tutup
Skip to content

Enable use of this library without installing source-map-support #1149

@mhassan1

Description

@mhassan1

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup