diff --git a/lib/builder/webpack/base.config.js b/lib/builder/webpack/base.config.js index c2a2d0b9ed..24277caf56 100644 --- a/lib/builder/webpack/base.config.js +++ b/lib/builder/webpack/base.config.js @@ -23,12 +23,18 @@ module.exports = function webpackBaseConfig({ name, isServer }) { // Used by vue-loader so we can use in templates // with - configAlias[this.options.dir.assets] = join(this.options.srcDir, this.options.dir.assets) - configAlias[this.options.dir.static] = join(this.options.srcDir, this.options.dir.static) + configAlias[this.options.dir.assets] = join( + this.options.srcDir, + this.options.dir.assets + ) + configAlias[this.options.dir.static] = join( + this.options.srcDir, + this.options.dir.static + ) const config = { name, - mode: this.options.dev ? 'development' : 'prodoction', + mode: this.options.dev ? 'development' : 'production', entry: { app: null }, @@ -47,12 +53,15 @@ module.exports = function webpackBaseConfig({ name, isServer }) { }, resolve: { extensions: ['.js', '.json', '.vue', '.jsx'], - alias: Object.assign({ - '~': join(this.options.srcDir), - '~~': join(this.options.rootDir), - '@': join(this.options.srcDir), - '@@': join(this.options.rootDir) - }, configAlias), + alias: Object.assign( + { + '~': join(this.options.srcDir), + '~~': join(this.options.rootDir), + '@': join(this.options.srcDir), + '@@': join(this.options.rootDir) + }, + configAlias + ), modules: webpackModulesDir }, resolveLoader: {