We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e57e749 commit 1195aeeCopy full SHA for 1195aee
packages/@vue/cli-service/lib/util/getAssetPath.js
@@ -3,7 +3,11 @@ const path = require('path')
3
module.exports = function getAssetPath (options, filePath, placeAtRootIfRelative) {
4
// if the user is using a relative URL, place js & css at dist root to ensure
5
// relative paths work properly
6
- if (placeAtRootIfRelative && options.baseUrl.charAt(0) !== '/') {
+ if (
7
+ placeAtRootIfRelative &&
8
+ !(/^https?:/.test(options.baseUrl)) &&
9
+ options.baseUrl.charAt(0) !== '/'
10
+ ) {
11
return filePath.replace(/^\w+\//, '')
12
}
13
return options.assetsDir
0 commit comments