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:
parent
9417e4a4d2
commit
daa559738b
4 changed files with 40 additions and 0 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue