mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-24 08:08:54 -06:00
Merge branch 'dev' of github.com:vuejs/vue-cli into dev
This commit is contained in:
@@ -5,6 +5,7 @@ module.exports = (api, options) => {
|
||||
const inlineLimit = 10000
|
||||
|
||||
webpackConfig
|
||||
.mode('development')
|
||||
.context(api.service.context)
|
||||
.entry('app')
|
||||
.add('./src/main.js')
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
module.exports = (api, options) => {
|
||||
api.chainWebpack(webpackConfig => {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
webpackConfig
|
||||
.mode('development')
|
||||
|
||||
webpackConfig
|
||||
.devtool('cheap-module-eval-source-map')
|
||||
.output
|
||||
@@ -13,10 +10,6 @@ module.exports = (api, options) => {
|
||||
.plugin('hmr')
|
||||
.use(require('webpack/lib/HotModuleReplacementPlugin'))
|
||||
|
||||
webpackConfig
|
||||
.plugin('named-modules')
|
||||
.use(require('webpack/lib/NamedModulesPlugin'))
|
||||
|
||||
webpackConfig
|
||||
.plugin('no-emit-on-errors')
|
||||
.use(require('webpack/lib/NoEmitOnErrorsPlugin'))
|
||||
|
||||
@@ -6,7 +6,7 @@ let service = process.VUE_CLI_SERVICE
|
||||
if (!service) {
|
||||
const Service = require('./lib/Service')
|
||||
service = new Service(process.env.VUE_CLI_CONTEXT || process.cwd())
|
||||
service.init()
|
||||
service.init(process.env.VUE_CLI_MODE || process.env.NODE_ENV)
|
||||
}
|
||||
|
||||
module.exports = service.resolveWebpackConfig()
|
||||
|
||||
Reference in New Issue
Block a user