Skip to content

Commit debe016

Browse files
annityaHenning Kvinnesland
authored andcommitted
feat(react): whitelist debugging-options
1 parent 0389922 commit debe016

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/plugin-react/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ The `reactCompilerPreset` accepts an optional options object with the following
106106

107107
- `compilationMode` — Set to `'annotation'` to only compile components annotated with `"use memo"`.
108108
- `target` — Set to `'17'` or `'18'` to target older React versions (uses `react-compiler-runtime` instead of `react/compiler-runtime`).
109+
- `logger` — Example: `{ logEvent(filename, event) { console.log(`[Compiler] ${event.kind}: ${filename}`); } }`
110+
- `panicThreshold` — One of `'none' | 'critical_errors' | 'all_errors'` Determines whether compilation errors should fail the build or skip optimization.
109111

110112
```js
111113
babel({

packages/plugin-react/src/reactCompilerPreset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
export const reactCompilerPreset = (
77
options: Pick<
88
ReactCompilerBabelPluginOptions,
9-
'compilationMode' | 'target'
9+
'compilationMode' | 'target' | 'logger' | 'panicThreshold'
1010
> = {},
1111
): RolldownBabelPreset => ({
1212
preset: () => ({

0 commit comments

Comments
 (0)