I have just deployed my first ever Vue app.
But it didn’t work. When I opened browser console, there were multiple errors when opening
index.html about not able to load js and css files.
The path was wrong, they pointed to files at the
/css folders at the root, which don’t exist.
So I manually edited the index.html, whenever I found
src that starts with a slash, I removed the slash:
<link rel=icon href=favicon.ico> <link href=css/chunk-vendors.c580d68a.css rel=preload as=style> <link href=js/app.02f96af3.js rel=preload as=script> <link href=js/chunk-vendors.f4a6b8ab.js rel=preload as=script> <link href=css/chunk-vendors.c580d68a.css rel=stylesheet> <script src=js/chunk-vendors.f4a6b8ab.js> <script src=js/app.02f96af3.js>
After the slash removal, the application works!
Anybody know why as a default Vue put slash at the beginning of paths?
Can I change the build process to not add slash in the beginning of paths?