Skip to content

Commit 1542970

Browse files
grigioGeorge Czabania
authored and
George Czabania
committed
Add React Native Web support (facebook#407)
1 parent 3643632 commit 1542970

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/webpack.config.dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ module.exports = {
7777
// if we don't have a good solution, we should just make `babel-runtime`
7878
// a dependency in generated projects.
7979
// See https://github.com/facebookincubator/create-react-app/issues/255
80-
'babel-runtime/regenerator': require.resolve('babel-runtime/regenerator')
80+
'babel-runtime/regenerator': require.resolve('babel-runtime/regenerator'),
81+
'react-native': 'react-native-web'
8182
}
8283
},
8384
// Resolve loaders (webpack plugins for CSS, images, transpilation) from the

config/webpack.config.prod.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ module.exports = {
7272
// if we don't have a good solution, we should just make `babel-runtime`
7373
// a dependency in generated projects.
7474
// See https://github.com/facebookincubator/create-react-app/issues/255
75-
'babel-runtime/regenerator': require.resolve('babel-runtime/regenerator')
75+
'babel-runtime/regenerator': require.resolve('babel-runtime/regenerator'),
76+
'react-native': 'react-native-web'
7677
}
7778
},
7879
// Resolve loaders (webpack plugins for CSS, images, transpilation) from the

0 commit comments

Comments
 (0)