Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Allow withSentryConfig to accept async config function #8721

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Aug 2, 2023

Modified one template to use the async function instead, as adding an additional variant to an already bloated integration test runner felt meh.

Note that type from #7444 is incorrect.
It should be:

const nextConfig = async () => {
  /** @type {import('next').NextConfig} */
  return {};
}

and not:

/** @type {import('next').NextConfig} */
const nextConfig = async () => {
  return {};
}

Note #2: async function handling works for next >= 12.1 only: https://nextjs.org/docs/app/api-reference/next-config-js/pageExtensions

Verified the behavior locally using provided sample config from the original issue.

Fixes #7444

@kamilogorek kamilogorek requested review from a team, mydea and lforst and removed request for a team August 2, 2023 14:36
@kamilogorek kamilogorek merged commit ef5cb5f into develop Aug 2, 2023
45 checks passed
@kamilogorek kamilogorek deleted the async-nextjs-config branch August 2, 2023 15:06
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 with async function nextConfig not working
2 participants