Skip to content

Commit adbc1a2

Browse files
remon-nashidgaearon
authored andcommitted
Instruct Jest to load native components from RNW instead of RN (#1201)
1 parent 9fd528c commit adbc1a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-scripts/utils/createJestConfig.js

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
3838
transformIgnorePatterns: [
3939
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'
4040
],
41+
moduleNameMapper: {
42+
'^react-native$': 'react-native-web'
43+
}
4144
};
4245
if (rootDir) {
4346
config.rootDir = rootDir;

0 commit comments

Comments
 (0)