petervmeijgaard/vue-2-boilerplate

Change base href

brunonmelo opened this issue · 1 comments

Hello everyone.

This is the situation, I successfully deployed my application on server using the default base href, that is: www.my-site.com
but my problem was, when I tried to deployed on a preexisting site, in a sub-folder, something like this:
www.pre-existing-site.com/**my-app**

I only get a blank page with theses erros on console
manifest.da43be1555a119727311.js:1 Uncaught SyntaxError: Unexpected token < vendor.abe8c51c49b85b8961c6.js:1 Uncaught SyntaxError: Unexpected token < app.df6b4dc9228211035998.js:1 Uncaught SyntaxError: Unexpected token <

I know this erros is related to the base href settings to the assets path, and I know there's a way to config this in an Angular project, but I didn't manage to config this on this project.

My question is, how can I config this the base href on build projects?
Thanks you all.

Can you try to build the project again? I'm using Vue CLI 3 right now, so if the issue still exists, I believe you have to change a couple of settings in the vue.config.js-file.

For more information, visit the Vue CLI documentation here
I think you'll have to set this specific variable:
https://cli.vuejs.org/config/#baseurl