fix: webpack hot reloading
parent
e11f360376
commit
c173cffd62
|
@ -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: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'react-native$': 'react-native-web',
|
'react-native$': 'react-native-web',
|
||||||
|
|
Loading…
Reference in New Issue