Skip to content

Commit 0b3aa55

Browse files
committed
Set panicThreshold to undefined when debug set to none
1 parent e7c11bf commit 0b3aa55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

development/webpack/utils/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function getOptions(
247247
},
248248
reactCompilerDebug: {
249249
array: false,
250-
choices: ['all', 'critical', 'none'],
250+
choices: ['all', 'critical', 'none'] as const,
251251
default: 'none',
252252
description:
253253
'Sets React Compiler panic threshold that fails the build for all errors or critical errors only. If `none`, the build will not fail.',

development/webpack/utils/loaders/reactCompilerLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const getReactCompilerLoader = (
134134
const reactCompilerOptions = {
135135
target,
136136
logger: verbose ? (reactCompilerLogger as Logger) : undefined,
137-
panicThreshold: debug === 'none' ? debug : `${debug}_errors`,
137+
panicThreshold: debug === 'none' ? undefined : `${debug}_errors`,
138138
} as const satisfies ReactCompilerLoaderOption;
139139

140140
return {

0 commit comments

Comments
 (0)