Skip to content

Commit

Permalink
Ensure next.config.js function is handled for turbo (#43015)
Browse files Browse the repository at this point in the history
Fixes: #43001

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
  • Loading branch information
ijjk committed Nov 16, 2022
1 parent 443f74d commit 2500c8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/next/cli/next-dev.ts
Expand Up @@ -183,6 +183,12 @@ const nextDev: cliCommand = async (argv) => {
await loadConfig(PHASE_DEVELOPMENT_SERVER, dir, undefined, true)
) as NextConfig

if (typeof rawNextConfig === 'function') {
rawNextConfig = (rawNextConfig as any)(PHASE_DEVELOPMENT_SERVER, {
defaultConfig,
})
}

const checkUnsupportedCustomConfig = (
configKey = '',
parentUserConfig: any,
Expand Down

0 comments on commit 2500c8b

Please sign in to comment.