Skip to content

Commit

Permalink
feat: vue.config devBaseUrl (fix #1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 17, 2018
1 parent 131cc46 commit 1b27231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@vue/cli-service/lib/config/dev.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = api => {
module.exports = (api, options) => {
api.chainWebpack(webpackConfig => {
if (process.env.NODE_ENV === 'development') {
webpackConfig
.devtool('cheap-module-eval-source-map')
.output
.publicPath('/')
.publicPath(options.devBaseUrl || '/')

webpackConfig
.plugin('hmr')
Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli-service/lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { createSchema, validate } = require('@vue/cli-shared-utils')

const schema = createSchema(joi => joi.object({
baseUrl: joi.string(),
devBaseUrl: joi.string(),
outputDir: joi.string(),
compiler: joi.boolean(),
productionSourceMap: joi.boolean(),
Expand Down

0 comments on commit 1b27231

Please sign in to comment.