Repository navigation
Conversation
size-limit report 📦Compared: 7e07b01 (PR test merge using develop at 9279303) Against: 9279303 (develop) · base run #66015 ✅ Baseline matches: this diff contains only this PR's changes.
|
0e1ebee to
fa0c152
Compare
…f a glob The SDK now passes `deleteSourcemapsAfterUpload` to the webpack plugin instead of the `./public/**/*.map` glob. The user's own option wins, and `true` is the fallback when the SDK turned on hidden source maps. When it is set, the SDK also sets `sdkEnabledSourceMaps`, so the plugin removes all maps of the build, also CSS maps and maps of chunks outside the upload, and also when no upload runs. Both options are only passed in the `build-javascript` stage, because Gatsby reads the `build-html` maps in `.cache` to map HTML render errors.
fa0c152 to
c91ce96
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c91ce96. Configure here.
| plugins: expect.arrayContaining([expect.any(Object)]), | ||
| }), | ||
| ); | ||
|
|
There was a problem hiding this comment.
Feat lacks integration or E2E test
Medium Severity
This was flagged because the review guidelines require feat PRs to include an integration or E2E test. Coverage here is only unit tests that assert plugin options, so they never confirm that a real Gatsby public/ build has neither leftover .map files nor sourceMappingURL comments after deletion.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit c91ce96. Configure here.


The Gatsby SDK deleted source maps with a
./public/**/*.mapglob after the upload. It now passesdeleteSourcemapsAfterUploadto the webpack plugin instead. The user's own option wins, andtrueis the fallback when the SDK turned on hidden source maps. When deletion is on, the SDK also sets the internalsdkEnabledSourceMapsflag, so the plugin removes every map the build emits, also CSS maps and maps of chunks the upload leaves out, and also when no upload runs. Both options are only passed in thebuild-javascriptstage. Gatsby reads thebuild-htmlmaps in.cacheto map HTML render errors, and the old glob never touched them either.There are two differences. First, with
devtool: 'source-map'anddeleteSourcemapsAfterUpload: truethe plugin now switches to hidden source maps; before, the glob leftsourceMappingURLcomments that pointed to deleted files. Second, maps that the current build did not emit, such as maps copied fromstatic/or left inpublic/from an earlier build, are no longer removed.There is no Gatsby E2E app, so only unit tests cover this. Note that Gatsby's own production default is
devtool: 'source-map', so the SDK does not turn maps on or delete them in a default Gatsby build. This PR does not change that.