-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Closed
Copy link
Labels
Description
Version
2.5.17-beta.0
Reproduction link
Steps to reproduce
No need to repro, it's written in the code.
vue/src/server/template-renderer/index.js
Line 107 in 2efc044
? cssFiles.map(file => `<link rel="stylesheet" href="${this.publicPath}/${file}">`).join('') |
vue/src/server/template-renderer/index.js
Lines 139 to 141 in 2efc044
return `<link rel="preload" href="${ | |
this.publicPath}/${file | |
}"${ |
vue/src/server/template-renderer/index.js
Line 160 in 2efc044
return `<link rel="prefetch" href="${this.publicPath}/${file}" as="script">` |
vue/src/server/template-renderer/index.js
Line 184 in 2efc044
return `<script src="${this.publicPath}/${file}"></script>` |
href="${this.publicPath}/${file}"
src="${this.publicPath}/${file}"
The publicPath
of webpackConfig.output
could be empty, and it is resonable.
What is expected?
publicPath = ''
generatesassets/css/xxx
publicPath = '/'
generates/assets/css/xxx
They are rather different
What is actually happening?
publicPath = ''
andpublicPath = '/'
both generate/assets/css/xxx
So we could introduce an extra judgement for this.publicPath === ''
Or we could just use publicPath
directly.