1
votes

I've got the problem, whenever I change the path in vue.config.js and vue-router the page doesn't work on the local server in XAMMP. I've changed the publicPath and outputPath.

More details here, I put this link because nobody has responded. In the link below there's also a link to the repository on GitHub:

https://forum.vuejs.org/t/problem-with-vue-routing-on-vue-cli-3-content-doesnt-show-in-the-different-path/55000

Thank you for any help. I got badly stacked here.

1
While using vue-router you also need to set router base property in router's index file.Have you done that??const router = new Router({ mode: 'history', base: /foldername })Riddhi
So if I have publicPath chosen to be /ninja-custom/app/znaczki654
I have to put base: / or base: /ninja-custom/app/znaczki654
Set as base:/ninja-custom/app and don't forget to build again to check the results.Riddhi
It helped, thank you very much!znaczki654

1 Answers

1
votes

While using vue-router you also need to set router base property in router's index file. Have you done that?? const router = new Router({ mode: 'history', base: /foldername }) Refer the following link for more details: https://router.vuejs.org/api/#base