File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -164,22 +164,18 @@ export async function validateTurboNextConfig({
164164 // configuration. Otherwise the user explicitly picked turbopack and thus we expect that
165165 // they have configured it correctly.
166166 if ( process . env . TURBOPACK === 'auto' && hasWebpackConfig && ! hasTurboConfig ) {
167- const logMethod = isDev ? Log . warn : Log . error
168- // In a production build with auto-detected Turbopack, we want to fail the build.
169- logMethod (
167+ // If we defaulted to Turbopack, we want to fail the build.
168+ Log . error (
170169 `Webpack is configured while Turbopack is not. This may be a mistake.`
171170 )
172- logMethod (
171+ Log . error (
173172 `To configure Turbopack, see:\n https://nextjs.org/docs/app/api-reference/next-config-js/turbopack`
174173 )
175- logMethod (
174+ Log . error (
176175 `TIP: Silence this ${ isDev ? 'warning' : 'error' } by passing the --turbopack or --webpack flag explicitly.`
177176 )
178177
179- // For production builds we want to simply fail to prevent accidental misconfiguration.
180- if ( ! isDev ) {
181- process . exit ( 1 )
182- }
178+ process . exit ( 1 )
183179 }
184180
185181 if ( unsupportedConfig . length ) {
You can’t perform that action at this time.
0 commit comments