Adding history support
Arriving on a new map now changes the URL. All URLs starting with _ are automatically redirected to index.html by the web server
This commit is contained in:
@@ -8,6 +8,12 @@ module.exports = {
|
||||
contentBase: './dist',
|
||||
host: '0.0.0.0',
|
||||
disableHostCheck: true,
|
||||
historyApiFallback: {
|
||||
rewrites: [
|
||||
{ from: /^_\/.*$/, to: '/index.html' }
|
||||
],
|
||||
disableDotRule: true
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -24,6 +30,7 @@ module.exports = {
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
publicPath: '/'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
|
||||
Reference in New Issue
Block a user