mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-26 00:59:02 -06:00
* feat: deprecate confusing `baseUrl` option, use `publicPath` instead. * fix: do not touch CHANGELOG.md * docs: links referring baseUrl now changed to publicPath
26 lines
728 B
JavaScript
26 lines
728 B
JavaScript
module.exports = (api, options) => {
|
|
api.chainWebpack(webpackConfig => {
|
|
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {
|
|
webpackConfig
|
|
.devtool('cheap-module-eval-source-map')
|
|
.output
|
|
.publicPath(options.publicPath)
|
|
|
|
webpackConfig
|
|
.plugin('hmr')
|
|
.use(require('webpack/lib/HotModuleReplacementPlugin'))
|
|
|
|
// https://github.com/webpack/webpack/issues/6642
|
|
webpackConfig
|
|
.output
|
|
.globalObject('this')
|
|
|
|
if (!process.env.VUE_CLI_TEST && options.devServer.progress !== false) {
|
|
webpackConfig
|
|
.plugin('progress')
|
|
.use(require('webpack/lib/ProgressPlugin'))
|
|
}
|
|
}
|
|
})
|
|
}
|