Reputation: 20669
I'm using Vue CLI 3.3 and building vue projects for my vertical website, but every time I build the project, the assets of dist/index.html
always load from my root path, like:
<script src=js/chunk-vendors.b0f460c7.js></script>
Is there a way to make these assets load from current path? Such as
<script src=./js/chunk-vendors.b0f460c7.js></script>
Upvotes: 1
Views: 5082
Reputation: 14259
You can set publicPath
in your vue.config.js
(see https://cli.vuejs.org/config/#publicpath)
module.exports =
{
publicPath: './',
};
Upvotes: 3