Skip to content

Commit 27ffd28

Browse files
committedJan 12, 2019
fix: copy publicPath option to baseUrl, fix plugin compatibility
1 parent 469ced1 commit 27ffd28

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎packages/@vue/cli-service/lib/Service.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -339,15 +339,13 @@ module.exports = class Service {
339339
}
340340
}
341341

342-
// if (typeof resolved.publicPath === 'undefined') {
343-
// resolved.publicPath = '/'
344-
// }
345-
346342
// normalize some options
347343
ensureSlash(resolved, 'publicPath')
348344
if (typeof resolved.publicPath === 'string') {
349345
resolved.publicPath = resolved.publicPath.replace(/^\.\//, '')
350346
}
347+
// for compatibility concern, in case some plugins still rely on `baseUrl` option
348+
resolved.baseUrl = resolved.publicPath
351349
removeSlash(resolved, 'outputDir')
352350

353351
// deprecation warning

‎packages/@vue/cli-service/lib/options.js

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ function hasMultipleCores () {
7171
exports.defaults = () => ({
7272
// project deployment base
7373
publicPath: '/',
74+
// for compatibility concern. TODO: remove in v4.
75+
baseUrl: '/',
7476

7577
// where to output built files
7678
outputDir: 'dist',

0 commit comments

Comments
 (0)
Please sign in to comment.