evanw / node-source-map-support

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

Feature Request: Provide a `source-map-support/register-hook-require` entry-point. #239

Closed coreyfarrell closed 2 years ago

coreyfarrell commented 5 years ago

I'm looking into an nyc bug report where the user cannot get source-map-support working. Unfortunately nyc --require source-map-support/register does not work due to inline source-maps. It would be very useful to us if your package included a register-hook-require.js (or similar file) containing:

require('./').install({hookRequire: true});

This would give us a simple method of documenting how to enable source-map-support when not using @babel/register.

CC @bcoe

LinusU commented 2 years ago

@coreyfarrell we have added this in #257, but it isn't currently documented. Would you be able to submit a PR that adds some documentation to the readme? ❤️