Skip to content

Commit cf698e5

Browse files
remon-nashidrandycoulman
authored andcommitted
Instruct Jest to load native components from RNW instead of RN (facebook#1201)
1 parent 9d5bc4c commit cf698e5

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
@@ -44,6 +44,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
4444
transformIgnorePatterns: [
4545
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'
4646
],
47+
moduleNameMapper: {
48+
'^react-native$': 'react-native-web'
49+
}
4750
};
4851
if (rootDir) {
4952
config.rootDir = rootDir;

0 commit comments

Comments
 (0)