Skip to content

Commit 2500c8b

Browse files
authored
Ensure next.config.js function is handled for turbo (#43015)
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)
1 parent 443f74d commit 2500c8b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/next/cli/next-dev.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ const nextDev: cliCommand = async (argv) => {
183183
await loadConfig(PHASE_DEVELOPMENT_SERVER, dir, undefined, true)
184184
) as NextConfig
185185

186+
if (typeof rawNextConfig === 'function') {
187+
rawNextConfig = (rawNextConfig as any)(PHASE_DEVELOPMENT_SERVER, {
188+
defaultConfig,
189+
})
190+
}
191+
186192
const checkUnsupportedCustomConfig = (
187193
configKey = '',
188194
parentUserConfig: any,

0 commit comments

Comments
 (0)