Skip to content

Commit 023fcdc

Browse files
committed
Block production build in production with turbopack
1 parent e03f99e commit 023fcdc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/next-plugin/src/plugin.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export function DevupUI(
2626
process.env.TURBOPACK === '1' || process.env.TURBOPACK === 'auto'
2727
// turbopack is now stable, TURBOPACK is set to auto without any flags
2828
if (isTurbo) {
29+
if (process.env.NODE_ENV === 'production') {
30+
throw new Error('Devup UI is not supported in production with turbopack')
31+
}
32+
2933
config ??= {}
3034
config.turbopack ??= {}
3135
config.turbopack.rules ??= {}
@@ -51,11 +55,7 @@ export function DevupUI(
5155
})
5256
if (!existsSync(gitignoreFile)) writeFileSync(gitignoreFile, '*')
5357
// disable turbo parallel
54-
process.env.TURBOPACK_LOADER_CPU = '1'
55-
56-
// will be removed after merge
57-
// https://github.com/vercel/next.js/pull/85268
58-
process.env.TURBOPACK_DEBUG_JS = 'webpack_loader'
58+
process.env.TURBOPACK_DEBUG_JS = '*'
5959
process.env.NODE_OPTIONS ??= ''
6060
process.env.NODE_OPTIONS += ' --inspect-brk'
6161

0 commit comments

Comments
 (0)