Skip to content

add api to detect whether source-maps are enabled #46304

Closed
@sapphi-red

Description

@sapphi-red

What is the problem this feature will solve?

#39085 added process.setSourceMapsEnabled to enable source-maps programmatically. This is helpful for tools like Vite, thank you for implementing. 💚

But as this was implemented we now cannot know whether source-maps are enabled. I guess it was possible by process.execArgv.includes('--enable-source-maps') previously.

What is the feature you are proposing to solve the problem?

Add process.getSourceMapsEnabled that returns whether the source-maps are enabled.

What alternatives have you considered?

Add a getter + setter named process.isSourceMapsEnabled that works like process.getSourceMapsEnabled and process.setSourceMapsEnabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions