File tree Expand file tree Collapse file tree
babel-plugin-react-compiler/src
__tests__/fixtures/compiler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,13 +9,6 @@ module.exports = function (api) {
99 api . cache ( true ) ;
1010 return {
1111 presets : [ 'next/babel' ] ,
12- plugins : [
13- [
14- 'babel-plugin-react-compiler' ,
15- {
16- runtimeModule : 'react-compiler-runtime' ,
17- } ,
18- ] ,
19- ] ,
12+ plugins : [ [ 'babel-plugin-react-compiler' ] ] ,
2013 } ;
2114} ;
Original file line number Diff line number Diff line change @@ -87,17 +87,6 @@ export type PluginOptions = {
8787 */
8888 compilationMode : CompilationMode ;
8989
90- /*
91- * If enabled, Forget will import `useMemoCache` from the given module
92- * instead of `react/compiler-runtime`.
93- *
94- * ```
95- * // If set to "react-compiler-runtime"
96- * import {c as useMemoCache} from 'react-compiler-runtime';
97- * ```
98- */
99- runtimeModule ?: string | null | undefined ;
100-
10190 /**
10291 * By default React Compiler will skip compilation of code that suppresses the default
10392 * React ESLint rules, since this is a strong indication that the code may be breaking React rules
@@ -214,7 +203,6 @@ export const defaultOptions: PluginOptions = {
214203 logger : null ,
215204 gating : null ,
216205 noEmit : false ,
217- runtimeModule : null ,
218206 eslintSuppressionRules : null ,
219207 flowSuppressions : true ,
220208 ignoreUseNoForget : false ,
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ function makePluginOptions(
4848 let enableEmitFreeze = null ;
4949 let enableEmitHookGuards = null ;
5050 let compilationMode : CompilationMode = 'all' ;
51- let runtimeModule = null ;
5251 let panicThreshold : PanicThresholdOptions = 'all_errors' ;
5352 let hookPattern : string | null = null ;
5453 // TODO(@mofeiZ) rewrite snap fixtures to @validatePreserveExistingMemo:false
@@ -104,10 +103,6 @@ function makePluginOptions(
104103 importSpecifierName : '$dispatcherGuard' ,
105104 } ;
106105 }
107- const runtimeModuleMatch = / @ r u n t i m e M o d u l e = " ( [ ^ " ] + ) " / . exec ( firstLine ) ;
108- if ( runtimeModuleMatch ) {
109- runtimeModule = runtimeModuleMatch [ 1 ] ;
110- }
111106
112107 const targetMatch = / @ t a r g e t = " ( [ ^ " ] + ) " / . exec ( firstLine ) ;
113108 if ( targetMatch ) {
@@ -251,7 +246,6 @@ function makePluginOptions(
251246 gating,
252247 panicThreshold,
253248 noEmit : false ,
254- runtimeModule,
255249 eslintSuppressionRules,
256250 flowSuppressions,
257251 ignoreUseNoForget,
You can’t perform that action at this time.
0 commit comments