Skip to content

Not an issue, just a comment - node.js 12.17 introduced a relevant (experimental) API #3

@binyamin

Description

@binyamin

See https://nodejs.org/docs/latest-v16.x/api/module.html#source-map-v3-support.

import module from 'node:module';
const sourceMap = module.findSourceMap('./my-file.js');
const position = sourceMap.findEntry(1, 1);
// run file with the `--enable-source-maps` flag

Of course, it is experimental, and I don't know if it works with CommonJS scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions