Repository navigation
Conversation
size-limit report 📦Compared: 61b4a8f (PR test merge using develop at ae0f584) Against: ae0f584 (develop) · base run #67008 ✅ Baseline matches: this diff contains only this PR's changes.
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 7 successful. See the run.
Successful checks
|
2de614c to
b5b1f4d
Compare
b5b1f4d to
7af6213
Compare
deleteSourcemapsAfterUpload…leteSourcemapsAfterUpload` The webpack client compiler no longer gets the `static/**/*.map` globs. It passes the SDK's `deleteSourcemapsAfterUpload` to the plugin instead, with `true` as the default. A user's own `filesToDeleteAfterUpload` is passed through and replaces this deletion, as before, so the plugin then gets `false`. Whenever the client deletes, it also passes `sdkEnabledSourceMaps`, so the plugin removes every JS and CSS map of the client build: those the SDK turned on and those the user turned on with `productionBrowserSourceMaps` or `devtool`, also of chunks outside the upload globs and also when no upload runs. Server and edge compilers get `false`, so their maps stay as before. Turbopack and `useRunAfterProductionCompileHook` builds keep the globs. The E2E apps now import a CSS file and also check `.next/static` for `sourceMappingURL` comments in JS and CSS.
7af6213 to
0cd6ffa
Compare
…etry An unset option sent the text "undefined" as its tag value. The telemetry snapshots of the integration tests now hold the three new tags.
…urcemaps-after-upload
sourcemaps.upload, injectDebugIds and delete
a3aed62 to
36f613c
Compare
…urcemaps-after-upload
…-sourcemaps-after-upload
| sourcemaps: { | ||
| disable: skipSourcemapsUpload ? true : (sentryBuildOptions.sourcemaps?.disable ?? false), | ||
| ...getSourceMapFeatureOptions(userSourcemaps, skipSourcemapsUpload), | ||
| // `sourcemaps.delete` does not reach the plugin, which would also remove the server source maps. |
There was a problem hiding this comment.
Since delete isn't forwarded, the plugin's conflict warnings never fire here: delete: false + filesToDeleteAfterUpload still deletes, and deleteSourcemapsAfterUpload is silently ignored when delete is set. Should we warn from the SDK, like we do for disable?
There was a problem hiding this comment.
Yes. #26626 moves those warnings into @sentry/core, and a follow-up PR calls them from the SDKs that don't forward delete once both land.
On webpack, the SDK no longer deletes client maps with its own
static/**/*.mapglobs. The client compiler passesdeleteSourcemapsAfterUploadandsdkEnabledSourceMapsto the bundler plugin. The plugin then removes every JS and CSS map of the client build, also when no upload runs. Server and edge maps stay. Turbopack anduseRunAfterProductionCompileHookkeep their globs.The SDK also supports
sourcemaps.upload,injectDebugIdsanddelete.deleteapplies to client maps only and keeps the Next.js default: client maps are removed on webpack, and on Turbopack when the SDK turned them on. Withupload: falseorinjectDebugIds: false, onlydelete: trueremoves maps. The plugin does not getdelete, because it would also remove the server maps. With the source map setting unset, Sentry turns on maps only when it uploads them or whendelete: falsekeeps them.Fixes:
sourceMappingURLcomments that point at missing files. The plugin switches them to hidden maps.Other behaviour changes:
afterEmit, so a plugin that reads them from disk after emit finds none.delete: true, a user'sfilesToDeleteAfterUploadruns next to the SDK's deletion. Withoutdelete, it still replaces it.Still open:
useRunAfterProductionCompileHook: false, the SDK turns onproductionBrowserSourceMapsand nothing uploads or deletes them.devtool, because it cannot tell a user'sfalsefrom the Next.js default.rewriteSourcesandmoduleMetadataare never applied.E2E: the apps now include CSS and check for
sourceMappingURLcomments.nextjs-sourcemapsgets "delete option" and "manual upload" variants for Turbopack and webpack.