[Vuejs]-Vue.js Router Base Setting breaking links in Development Mode

0👍

Found it out myself.

For some reason changing the router base path also changes the base path for the internal JS links from js to app/js.
So for the development mode one also has to change the vue.config.js publicPath variable. With the following vue.config.js it works.

[...]
module.exports = defineConfig({

  publicPath: process.env.NODE_ENV === 'production' ? '/static/spa' : '/app/',

[...]

Leave a comment