File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ The `reactCompilerPreset` accepts an optional options object with the following
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 ` ).
109109
110+ Additional options can be found in the [ documentation] ( https://react.dev/reference/react-compiler/configuration ) .
111+
110112``` js
111113babel ({
112114 presets: [reactCompilerPreset ({ compilationMode: ' annotation' })],
Original file line number Diff line number Diff line change @@ -4,10 +4,7 @@ import type {
44} from '#optionalTypes'
55
66export const reactCompilerPreset = (
7- options : Pick <
8- ReactCompilerBabelPluginOptions ,
9- 'compilationMode' | 'target'
10- > = { } ,
7+ options : ReactCompilerBabelPluginOptions = { } ,
118) : RolldownBabelPreset => ( {
129 preset : ( ) => ( {
1310 plugins : [ [ 'babel-plugin-react-compiler' , options ] ] ,
You can’t perform that action at this time.
0 commit comments