Repository navigation
fix(nextjs): Only inject applicationKey metadata into browser bundles - #25565
Merged
Merged
Conversation
The metadata snippet was injected into server and edge modules too, where nothing reads it, adding to every cold start. Fixes #25544
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 23d3442. Configure here.
logaretm
marked this pull request as ready for review
October 20, 2026 15:03
logaretm
requested review from
chargome and
s1gr1d
and removed request for
a team
October 20, 2026 15:03
s1gr1d
approved these changes
Oct 20, 2026
logaretm
added a commit
that referenced
this pull request
Oct 20, 2026
…dles (#25567) Backport of: #25565 ## Differences to the original PR - `packages/nextjs/src/config/getBuildPluginOptions.ts`: the server/edge `applicationKey` override is spread after `webpack.unstable_sentryWebpackPluginOptions`, because v10 still spreads those options last and our docs tell webpack users to set `applicationKey` there. Added a test for that path. - `constructTurbopackConfig.ts` and its test: kept v10's `_experimental.turbopackApplicationKey` fallback and its test, which `develop` no longer has.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
applicationKeymetadata snippet was also injected into every server and edge module, where nothing reads it and it slows cold starts, fixed by limiting it to browser modules in both the Turbopack rule and the webpack plugin options.I updated the Turbopack rule tests for the browser condition and added a test that webpack server and edge builds no longer get the key.
closes #25544