mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-05 22:48:27 -06:00
fix: copy publicPath option to baseUrl, fix plugin compatibility
This commit is contained in:
@@ -339,15 +339,13 @@ module.exports = class Service {
|
||||
}
|
||||
}
|
||||
|
||||
// if (typeof resolved.publicPath === 'undefined') {
|
||||
// resolved.publicPath = '/'
|
||||
// }
|
||||
|
||||
// normalize some options
|
||||
ensureSlash(resolved, 'publicPath')
|
||||
if (typeof resolved.publicPath === 'string') {
|
||||
resolved.publicPath = resolved.publicPath.replace(/^\.\//, '')
|
||||
}
|
||||
// for compatibility concern, in case some plugins still rely on `baseUrl` option
|
||||
resolved.baseUrl = resolved.publicPath
|
||||
removeSlash(resolved, 'outputDir')
|
||||
|
||||
// deprecation warning
|
||||
|
||||
@@ -71,6 +71,8 @@ function hasMultipleCores () {
|
||||
exports.defaults = () => ({
|
||||
// project deployment base
|
||||
publicPath: '/',
|
||||
// for compatibility concern. TODO: remove in v4.
|
||||
baseUrl: '/',
|
||||
|
||||
// where to output built files
|
||||
outputDir: 'dist',
|
||||
|
||||
Reference in New Issue
Block a user