File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ module.exports = {
66 '<rootDir>/scripts/rollup/shims/' ,
77 '<rootDir>/scripts/bench/' ,
88 ] ,
9+ moduleNameMapper : {
10+ '^babel-plugin-react-compiler$' :
11+ '<rootDir>/compiler/packages/babel-plugin-react-compiler/src/index.ts' ,
12+ } ,
913 transform : {
1014 '^.+\\.ts$' : [
1115 'babel-jest' ,
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ moduleNameMapper['^react-reconciler/([^/]+)$'] =
5656module . exports = Object . assign ( { } , baseConfig , {
5757 // Redirect imports to the compiled bundles
5858 moduleNameMapper : {
59+ ...baseConfig . moduleNameMapper ,
5960 ...devtoolsRegressionConfig . moduleNameMapper ,
6061 ...moduleNameMapper ,
6162 } ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const packages = readdirSync(packagesRoot).filter(dir => {
3232} ) ;
3333
3434// Create a module map to point React packages to the build output
35- const moduleNameMapper = { } ;
35+ const moduleNameMapper = { ... baseConfig . moduleNameMapper } ;
3636
3737// Allow bundle tests to read (but not write!) default feature flags.
3838// This lets us determine whether we're running in different modes
@@ -53,6 +53,8 @@ moduleNameMapper['use-sync-external-store/shim/with-selector'] =
5353 `<rootDir>/build/${ NODE_MODULES_DIR } /use-sync-external-store/shim/with-selector` ;
5454moduleNameMapper [ 'use-sync-external-store/shim/index.native' ] =
5555 `<rootDir>/build/${ NODE_MODULES_DIR } /use-sync-external-store/shim/index.native` ;
56+ moduleNameMapper [ '^babel-plugin-react-compiler$' ] =
57+ '<rootDir>/compiler/packages/babel-plugin-react-compiler/src/index.ts' ;
5658
5759module . exports = Object . assign ( { } , baseConfig , {
5860 // Redirect imports to the compiled bundles
You can’t perform that action at this time.
0 commit comments