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({
164
164
// configuration. Otherwise the user explicitly picked turbopack and thus we expect that
165
165
// they have configured it correctly.
166
166
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 (
170
169
`Webpack is configured while Turbopack is not. This may be a mistake.`
171
170
)
172
- logMethod (
171
+ Log . error (
173
172
`To configure Turbopack, see:\n https://nextjs.org/docs/app/api-reference/next-config-js/turbopack`
174
173
)
175
- logMethod (
174
+ Log . error (
176
175
`TIP: Silence this ${ isDev ? 'warning' : 'error' } by passing the --turbopack or --webpack flag explicitly.`
177
176
)
178
177
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 )
183
179
}
184
180
185
181
if ( unsupportedConfig . length ) {
You can’t perform that action at this time.
0 commit comments