Skip to content

Instantly share code, notes, and snippets.

@giggo1604
Created July 11, 2018 07:50
Show Gist options
  • Save giggo1604/7eee28f4f8b56ff359bde4cadf6c3f43 to your computer and use it in GitHub Desktop.
Save giggo1604/7eee28f4f8b56ff359bde4cadf6c3f43 to your computer and use it in GitHub Desktop.
vue-cli 3.0 multi-page config with historyApiFallback
module.exports = {
pages: {
foo: {
entry: 'src/foo/main.js',
template: 'public/index.foo.html',
filename: 'index.foo.html'
},
bar: {
entry: 'src/bar/main.js',
template: 'public/index.bar.html',
filename: 'index.bar.html'
}
},
devServer: {
historyApiFallback: {
rewrites: [
{ from: /\/foo/, to: '/index.foo.html' },
{ from: /\/bar/, to: '/index.bar.html' }
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment