mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-06 03:45:18 +00:00
Update docs suggested preset to metro-react-native-babel-preset
Updating the document as `babel-preset-react-native` is deprecated in favor for `metro-react-native-babel-preset`. More info here - https://www.npmjs.com/package/babel-preset-react-native. Close #1751
This commit is contained in:
committed by
Nicolas Gallagher
parent
72bfe499c5
commit
06d3cadf05
@@ -94,8 +94,8 @@ const babelLoaderConfiguration = {
|
|||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: {
|
options: {
|
||||||
cacheDirectory: true,
|
cacheDirectory: true,
|
||||||
// The 'react-native' preset is recommended to match React Native's packager
|
// The 'metro-react-native-babel-preset' preset is recommended to match React Native's packager
|
||||||
presets: ['react-native'],
|
presets: ['module:metro-react-native-babel-preset'],
|
||||||
// Re-write paths to import only the modules needed by the app
|
// Re-write paths to import only the modules needed by the app
|
||||||
plugins: ['react-native-web']
|
plugins: ['react-native-web']
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user