-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build option to set publicPath #976
Comments
Use baseUrl option in vue.config.js. |
baseUrl is not valid? |
@johansaldes |
How can we change the file name under dist folder when we build the project with vue-cli-service build |
@yyx990803 add a devServer option to change the baseUrl or publicPath is a good idea, this function is needed for our automatic construction. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
I'm trying to deploy a Vue.js application to Github Pages. Github Pages deploys to a URL that looks like username.github.io/repo-name. The problem is that the
vue-cli-service build
command builds links that look like/js/vendor.2e8c48c3.js
rather thanrepo-name/js/vendor.2e8c48c3.js
or./js/vendor.2e8c48c3.js
.There is a webpack option,
publicPath
, that I'm pretty sure is the solution, but there isn't a way to set that option with vue-cli.https://webpack.js.org/api/cli/#output-options
https://github.com/webpack/docs/wiki/configuration#outputpublicpath
What does the proposed API look like?
vue-cli-service build --publicPath='/repo-name'
The text was updated successfully, but these errors were encountered: