3.0.2
https://github.com/vuejs/vue-cli/files/2373799/2.1.0.zip
Node 811.1 /npm5.6.0 / Windows 10
I just create vue.config.js and
module.exports = {
baseUrl: './'
};
then I build , check the index.html
I want the relative path like <link href=./js/about.2b2e4615.js rel=prefetch>
<head>
<meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content="IE=edge">
<meta name=viewport content="width=device-width,initial-scale=1">
<link rel=icon href=favicon.ico>
<title>2.1.0</title>
<link href=js/about.2b2e4615.js rel=prefetch>
<link href=css/app.00caf2cc.css rel=preload as=style>
<link href=js/app.a7581183.js rel=preload as=script>
<link href=js/chunk-vendors.25414c9d.js rel=preload as=script>
<link href=css/app.00caf2cc.css rel=stylesheet>
</head>
@parox2014
notice the ./
./
are redundant in relative paths.
I have the same issue. I cannot apply "./" to the baseUrl, it will be ignored,
I disagree that "./" are redundant. Like in my case, if you upload the project to a specific path e.g. origin/pathname/index.html you need to the that otherwise all the files will be referred to the origin and not to the directory where it is placed.
Could you please fix it.
@ebastuart
They are redundant, indeed.
You can try it out yourself.
@hezhongfeng change baseUrl
to publicPath
Most helpful comment
@hezhongfeng change
baseUrl
topublicPath