Skip to content

Commit 4f8bc95

Browse files
committed
Add react-native-paper to babel loader config and --history-api-fallback to dev server flags
1 parent 2eb2495 commit 4f8bc95

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

react-native-scripts/src/scripts/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ https://github.com/npm/npm/issues/16991
104104
if (withWebSupport) {
105105
appPackage.main = './node_modules/react-native-scripts/build/bin/crna-entry-web.js';
106106
Object.assign(appPackage.scripts, {
107-
web: 'webpack-dev-server -d --config ./webpack.config.js --inline --hot --colors --content-base public/',
107+
web: 'webpack-dev-server -d --config ./webpack.config.js --inline --hot --colors --content-base public/ --history-api-fallback',
108108
build: 'NODE_ENV=production webpack -p --config ./webpack.config.js',
109109
});
110110
}

react-native-scripts/template-with-web/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const babelLoaderConfiguration = {
1616
path.resolve(appDirectory, 'src'),
1717
path.resolve(appDirectory, 'node_modules/react-navigation'),
1818
path.resolve(appDirectory, 'node_modules/react-native-tab-view'),
19+
path.resolve(appDirectory, 'node_modules/react-native-paper'),
1920
path.resolve(appDirectory, 'node_modules/react-native-vector-icons'),
2021
path.resolve(appDirectory, 'node_modules/react-native-safe-area-view'),
2122
path.resolve(appDirectory, 'node_modules/@expo/samples'),

0 commit comments

Comments
 (0)