bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.78k stars 1.32k forks source link

Asset routes are not relative in Production build #126

Closed frozonfreak closed 5 years ago

frozonfreak commented 5 years ago

In production build all asset routes are hardcoded for root path. So if I host my website in http://example.com/vue-enterprise/ the build will not work. This will be useful during prototyping and testing phase

Manually changing path in index.html in dist fixes most error, still a css and javascript path are incorrect.

chrisvfritz commented 5 years ago

It sounds like you probably need to configure the baseUrl option for Vue CLI. Let me know if that helps. 🙂

frozonfreak commented 5 years ago

Yep Missed tat. Thanks

chrisvfritz commented 5 years ago

@frozonfreak Just wanted to leave a note that in Vue CLI 3.3+, baseUrl was deprecated and the new publicPath option should be used in its place. 🙂

PhyberApex commented 4 years ago

Just as a little heads up you also need to set the base in the router to that path or else the routing wont work. Took me some time to figure that one out.