Skip to content

Commit 3d0f8a7

Browse files
committed
fix(cli-service): avoiding recreating dist directory
Fixes vuejs#6208
1 parent 3f82947 commit 3d0f8a7

File tree

1 file changed

+2
-2
lines changed
  • packages/@vue/cli-service/lib/commands/build

1 file changed

+2
-2
lines changed

packages/@vue/cli-service/lib/commands/build/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = (api, options) => {
3333
'--formats': `list of output formats for library builds (default: ${defaults.formats})`,
3434
'--name': `name for lib or web-component mode (default: "name" in package.json or entry filename)`,
3535
'--filename': `file name for output, only usable for 'lib' target (default: value of --name)`,
36-
'--no-clean': `do not remove the dist directory before building the project`,
36+
'--no-clean': `do not clean the dist directory before building the project`,
3737
'--report': `generate report.html to help analyze bundle content`,
3838
'--report-json': 'generate report.json to help analyze bundle content',
3939
'--skip-plugins': `comma-separated list of plugin names to skip for this run`,
@@ -193,7 +193,7 @@ async function build (args, api, options) {
193193
}
194194

195195
if (args.clean) {
196-
await fs.remove(targetDir)
196+
await fs.emptyDir(targetDir)
197197
}
198198

199199
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)