File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/@vue/cli-service/lib/commands/build Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11const defaults = {
2+ clean : true ,
23 target : 'app' ,
34 entry : 'src/App.vue'
45}
@@ -18,6 +19,7 @@ module.exports = (api, options) => {
1819 '--dest' : `specify output directory (default: ${ options . outputDir } )` ,
1920 '--target' : `app | lib | wc | wc-async (default: ${ defaults . target } )` ,
2021 '--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` ,
2123 '--watch' : `watch for changes`
2224 }
2325 } , async function build ( args ) {
@@ -125,7 +127,9 @@ module.exports = (api, options) => {
125127 process . exit ( 1 )
126128 }
127129
128- await fs . remove ( targetDir )
130+ if ( args . clean ) {
131+ await fs . remove ( targetDir )
132+ }
129133
130134 // Expose advanced stats
131135 if ( args . dashboard ) {
You can’t perform that action at this time.
0 commit comments