File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/@vue/cli-service/lib/commands Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const defaults = {
13
13
https : false
14
14
}
15
15
16
+ /** @type {import('@vue/cli-service').ServicePlugin } */
16
17
module . exports = ( api , options ) => {
17
18
api . registerCommand ( 'serve' , {
18
19
description : 'start development server' ,
@@ -50,8 +51,10 @@ module.exports = (api, options) => {
50
51
// configs that only matters for dev server
51
52
api . chainWebpack ( webpackConfig => {
52
53
if ( process . env . NODE_ENV !== 'production' && process . env . NODE_ENV !== 'test' ) {
53
- webpackConfig
54
- . devtool ( 'eval-cheap-module-source-map' )
54
+ if ( ! webpackConfig . get ( 'devtool' ) ) {
55
+ webpackConfig
56
+ . devtool ( 'eval-cheap-module-source-map' )
57
+ }
55
58
56
59
webpackConfig
57
60
. plugin ( 'hmr' )
You can’t perform that action at this time.
0 commit comments