Vue.js routes serving from subdirectory
The assetsPublicPath
config is just for webpack assets. For vue-router, you need to set the base
option in the constructor.
I have been able to solve this, using the base
property of vue-route
.In the case of the example it would look like this:
export default new Router({ mode: 'history', base: '/subdir/app/', routes: [ { path: '/', component: ContentView, children: [
My question now is how can I make this subdirectory dynamically.Imagine a single server, and 2 different urls pointing to this server.
www.dominio / app1www.dominio / app2