GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Incorrect debug ID is produced when using `devtool: "hidden-source-map-debugids"` · Issue #20133 · webpack/webpack

Incorrect debug ID is produced when using devtool: "hidden-source-map-debugids" #20133

New issue
Copy link
New issue
Copy link
Closed
Bug
Closed
Incorrect debug ID is produced when using devtool: "hidden-source-map-debugids"#20133
Bug
Copy link
Labels
help wantedMaintainers welcome a community PR for this

Description

@in-doge-we-trust
in-doge-we-trust
opened on Nov 18, 2025
Issue body actions

Bug Description

When I either set a devtool config value to hidden-source-map-debugids or use a webpack.SourceMapDevToolPlugin with a configuration matching hidden-source-map-debugids, the debug ID appended to the generated .js file is corrupted – it looks like //# debugId=<hash>false instead of //debugId=<hash>.

Link to Minimal Reproduction and step to reproduce

https://github.com/in-doge-we-trust/webpack-debugids-append-issue-repro

Case #1 (webpack.SourceMapDevToolPlugin is used manually) steps:

  1. Run npm install
  2. Run npm run build

Case #2 (devtool set to hidden-source-map-debugids) steps:

  1. Run npm run clear (optional)
  2. Run npm run build

Expected Behavior

debugId value in the source-map file matches the value in //# debugId=<hash> comment appended to the generated .js.

Actual Behavior

debugId value in the source-map file is correct, while //# debugId=<hash> comment has false appended to the end and looks like this – //# debugId=<hash>false.

Environment

Binaries:
    Node: 22.18.0
    npm: 10.9.3
Packages:
    webpack: 5.102.1 => 5.102.1
    webpack-cli: 6.0.1 => 6.0.1

Is this a regression?

No

Last Working Version

No response

Additional Context

As a temporary workaround, developers can force the append to be a new line character:

// webpack.config.js
const config = {
  // --snip--

  plugins: [
    new webpack.SourceMapDevToolPlugin({
      filename: "[file].map",

      debugIds: true,
      append: '\n', // force append value

      module: true,
      columns: true,
    }),
  ],
};

export default config;

In that case, append doesn't corrupt the injected debugId, so it looks correct.

Activity

  1. alexander-akait
    added the
    Bug
    issue type on Nov 18, 2025
  2. in-doge-we-trust commented on Nov 18, 2025

    @in-doge-we-trust
    in-doge-we-trust
    on Nov 18, 2025
    ContributorAuthor
    More actions

    I'd be happy to send a PR with a fix if this is not yet fixed in any of future releases 🙂

  3. alexander-akait
    added
    help wantedMaintainers welcome a community PR for this
    on Nov 18, 2025
  4. alexander-akait commented on Nov 18, 2025

    @alexander-akait
    alexander-akait
    on Nov 18, 2025
    Member
    More actions

    @in-doge-we-trust Feel free to send a PR, fix should be easy

  5. alexander-akait commented on Nov 18, 2025

    @alexander-akait
    alexander-akait
    on Nov 18, 2025
    Member
    More actions

    Fixed by #20134

  6. alexander-akait
    closed this as completedon Nov 18, 2025
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

    help wantedMaintainers welcome a community PR for this

    Type

    Bug

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.