Skip to content

Document webpack change: feat: Add support for injecting sourcemap debug ids #7476

@webpack-bot

Description

@webpack-bot

A pull request by @timfish was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#18947


What kind of change does this PR introduce?

Adds support to SourceMapDevToolPlugin for injecting debug IDs into source files and sourcemaps as per the TC39 proposal.

  • Sentry users have been relying on debug ids in production for a number of years. Sentry process hundreds of millions of files per month containing debug ids!
  • A Github search suggests debug ids are also used by Backtrace and Expo
  • Bun added debug id injection to it's bundler when they added sourcemap support
  • Rolldown added support in v0.14.0
  • Rollup added
    support in v4.25.0

Did you add tests for your changes?

Not yet but will add them if this is likely to get merged!

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

I guess the SourceMapDevToolPlugin docs need updating?

Ideally I would like this option to be accessible from the top-level webpack config. I toyed with the idea of adding it to the devtool option (ie. hidden-source-map-debug-ids) but this option already contains a lot of different combinations of options.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions