Skip to content

fix(nextjs): Inject client config into _app instead of main#7009

Merged
lforst merged 1 commit intodevelopfrom
lforst-fix-sdk-injection-ordering
Feb 1, 2023
Merged

fix(nextjs): Inject client config into _app instead of main#7009
lforst merged 1 commit intodevelopfrom
lforst-fix-sdk-injection-ordering

Conversation

@lforst
Copy link
Copy Markdown
Contributor

@lforst lforst commented Feb 1, 2023

Fixes #7006

Apparently with #6927 we broke some ordering of SDK injection for stuff like Next.js' getConfig() to work.

@lforst lforst requested review from AbhiPrasad and Lms24 February 1, 2023 08:22
@lforst lforst merged commit a111905 into develop Feb 1, 2023
@lforst lforst deleted the lforst-fix-sdk-injection-ordering branch February 1, 2023 08:41
entryPointName === 'main-app' // entrypoint for `/app` pages
// entrypoint for `/pages` pages - this is included on all clientside pages
// It's important that we inject the SDK into this file and not into 'main' because in 'main'
// some important Next.js code (like the setup code for getCongig()) is located and some users
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a typo. getCongig() should be getConfig()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for letting us know! :D

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.

@sentry/nextjs v7.34.0 breaks environment variable initialisation workflow

3 participants