File tree 1 file changed +5
-1
lines changed
packages/@vue/cli-service/lib/commands/build
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
const defaults = {
2
+ clean : true ,
2
3
target : 'app' ,
3
4
entry : 'src/App.vue'
4
5
}
@@ -18,6 +19,7 @@ module.exports = (api, options) => {
18
19
'--dest' : `specify output directory (default: ${ options . outputDir } )` ,
19
20
'--target' : `app | lib | wc | wc-async (default: ${ defaults . target } )` ,
20
21
'--name' : `name for lib or web-component mode (default: "name" in package.json or entry filename)` ,
22
+ '--no-clean' : `do not remove the dist directory before building the project` ,
21
23
'--watch' : `watch for changes`
22
24
}
23
25
} , async function build ( args ) {
@@ -125,7 +127,9 @@ module.exports = (api, options) => {
125
127
process . exit ( 1 )
126
128
}
127
129
128
- await fs . remove ( targetDir )
130
+ if ( args . clean ) {
131
+ await fs . remove ( targetDir )
132
+ }
129
133
130
134
// Expose advanced stats
131
135
if ( args . dashboard ) {
You can’t perform that action at this time.
0 commit comments