Skip to content

Replace --enable-source-maps with --disable-source-maps #38817

Description

@brillout

How about Node.js sets --enable-source-maps to true by default. If the user wants to get the real stack track, he can use --disable-source-maps.

The problem here is that tools like Vite cannot really leverage --enable-source-maps because it forces Vite users to set the flag --enable-source-maps which is less than ideal. We don't want to tell Vite users "you need to use this and that flag"; we want things to just work. We are actually interested in using source map support (which is a lovely new feature!) but the flag thing is a problem, see related discussions at vitejs/vite#3300.

Source map support is mostly taken care by frameworks; it is rarely implemented by the Node.js user himself. So we shouldn't leak this flag into user-land.

Also, in general, I'd argue that having source maps enabled by default seems to be a more sensible default.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.source mapsIssues and PRs related to source map support.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions