Skip to content

Commit 1b27231

Browse files
author
Guillaume Chau
committedApr 17, 2018
feat: vue.config devBaseUrl (fix #1102)
1 parent 131cc46 commit 1b27231

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎packages/@vue/cli-service/lib/config/dev.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
module.exports = api => {
1+
module.exports = (api, options) => {
22
api.chainWebpack(webpackConfig => {
33
if (process.env.NODE_ENV === 'development') {
44
webpackConfig
55
.devtool('cheap-module-eval-source-map')
66
.output
7-
.publicPath('/')
7+
.publicPath(options.devBaseUrl || '/')
88

99
webpackConfig
1010
.plugin('hmr')

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

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const { createSchema, validate } = require('@vue/cli-shared-utils')
22

33
const schema = createSchema(joi => joi.object({
44
baseUrl: joi.string(),
5+
devBaseUrl: joi.string(),
56
outputDir: joi.string(),
67
compiler: joi.boolean(),
78
productionSourceMap: joi.boolean(),

0 commit comments

Comments
 (0)
Please sign in to comment.