mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-24 16:18:57 -06:00
25 lines
684 B
JavaScript
25 lines
684 B
JavaScript
module.exports = (api, options) => {
|
|
api.chainWebpack(webpackConfig => {
|
|
if (process.env.NODE_ENV === 'development') {
|
|
webpackConfig
|
|
.devtool('cheap-module-eval-source-map')
|
|
.output
|
|
.publicPath(options.baseUrl)
|
|
|
|
webpackConfig
|
|
.plugin('hmr')
|
|
.use(require('webpack/lib/HotModuleReplacementPlugin'))
|
|
|
|
webpackConfig
|
|
.plugin('no-emit-on-errors')
|
|
.use(require('webpack/lib/NoEmitOnErrorsPlugin'))
|
|
|
|
if (!process.env.VUE_CLI_TEST && options.devServer.progress !== false) {
|
|
webpackConfig
|
|
.plugin('progress')
|
|
.use(require('webpack/lib/ProgressPlugin'))
|
|
}
|
|
}
|
|
})
|
|
}
|