Skip to content

build: add dev source maps - #1948

Merged
Lightning00Blade merged 1 commit into
mainfrom
add-source-maps
Apr 23, 2026
Merged

Lightning00Blade merged 1 commit into
mainfrom
add-source-maps

Conversation

@Lightning00Blade

Copy link
Copy Markdown
Collaborator

This allows setting up a debugger script with either enabled debugging port or tools like VS Code or Antigravity.

@Lightning00Blade
Lightning00Blade requested a review from OrKoN April 23, 2026 17:44
@Lightning00Blade
Lightning00Blade added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 136da6a Apr 23, 2026
20 checks passed
@Lightning00Blade
Lightning00Blade deleted the add-source-maps branch April 23, 2026 18:43
OrKoN pushed a commit that referenced this pull request Apr 27, 2026
This allows setting up a debugger script with either enabled debugging
port or tools like VS Code or Antigravity.
Lightning00Blade added a commit that referenced this pull request Oct 21, 2026
npm matches a negated `files` entry only at the package root, so
`!*.js.map` never excluded the source maps in build/src, and the package
has included them since #1948. Use `!**/*.js.map` to match them at any
depth.
yashdesai87 pushed a commit to yashdesai87/chrome-devtools-mcp that referenced this pull request Oct 21, 2026
Stacked on ChromeDevTools#3293.

ChromeDevTools#1948 enabled source maps for local debugging and added `!*.js.map` to
`files` in `package.json` to keep them out of the npm package. npm
matches a negated `files` entry only at the package root, so the entry
never matched the source maps in `build/src`, and the package has
included them since then. This PR changes the entry to `!**/*.js.map`,
the same form that ChromeDevTools#3293 uses for `.d.ts` files.

The published maps were of little use: they do not embed
`sourcesContent`, and the TypeScript sources that they reference are not
in the package.

## User-visible changes

- The npm package no longer includes `.js.map` files (100 files in a
local `npm pack --dry-run`).
- The published `.js` files still end with `//# sourceMappingURL=`
comments, which now point to files that are not in the package. Tools
that load source maps, such as debuggers, can warn that the map is
missing.

## Testing

- `npm pack --dry-run` lists no `.js.map` files and still lists the
`.js` files.
- `npm run format`
- `npm run test`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants