diff --git a/web/webpack.config.js b/web/webpack.config.js index e41f0a14..18056190 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -81,6 +81,27 @@ module.exports = { ], }, + devServer: { + historyApiFallback: { + rewrites: [ + {from: /.*\/bundle.web.js/, to: '/bundle.web.js'}, + { + from: /.*^\/(.*.hot-update.json)$/, + to: function (context) { + return '/' + context.parsedUrl.pathname.split('/').pop() + }, + }, + { + from: /.*^\/(.*.hot-update.js)$/, + to: function (context) { + return '/' + context.parsedUrl.pathname.split('/').pop() + }, + }, + {from: /.*/, to: '/index.html'}, + ], + }, + }, + resolve: { alias: { 'react-native$': 'react-native-web',