I've created an application using Vue.js and run npm run build
. After the finishing a process dist
folder appeared, BUT paths to static files are wrong. Everywhere it adds '/'
before every path. Smth like this: <script type="text/javascript" src="/static/js/app.5563dab9fc515679fa52.js"></script>
.
But it is wrong. It has to be without a forward slash before static
folder.
In development mode the file structure in src
looks like:
In production mode like this:
Solved:
I just changed index.js
file in config
folder.
From: assetsPublicPath: '/'
To: assetsPublicPath: ''