Skip to content

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, lforst and mydea and removed request for a team August 2, 2023 14:36
@kamilogorek kamilogorek merged commit ef5cb5f into develop Aug 2, 2023
@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

3 participants