Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b9e2f70

Browse filesBrowse files
authored
fix(cli-service): avoiding recreating dist directory (#6221)
1 parent 634bf59 commit b9e2f70
Copy full SHA for b9e2f70

File tree

Expand file treeCollapse file tree

5 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+6
-6
lines changed

‎docs/config/README.md

Copy file name to clipboardExpand all lines: docs/config/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Deprecated since Vue CLI 3.3, please use [`publicPath`](#publicPath) instead.
6565
- Type: `string`
6666
- Default: `'dist'`
6767

68-
The directory where the production build files will be generated in when running `vue-cli-service build`. Note the target directory will be removed before building (this behavior can be disabled by passing `--no-clean` when building).
68+
The directory where the production build files will be generated in when running `vue-cli-service build`. Note the target directory contents will be removed before building (this behavior can be disabled by passing `--no-clean` when building).
6969

7070
::: tip
7171
Always use `outputDir` instead of modifying webpack `output.path`.

‎docs/guide/cli-service.md

Copy file name to clipboardExpand all lines: docs/guide/cli-service.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Options:
8181
--inline-vue include the Vue module in the final bundle of library or web component target
8282
--name name for lib or web-component mode (default: "name" in package.json or entry filename)
8383
--filename file name for output, only usable for 'lib' target (default: value of --name),
84-
--no-clean do not remove the dist directory before building the project
84+
--no-clean do not remove the dist directory contents before building the project
8585
--report generate report.html to help analyze bundle content
8686
--report-json generate report.json to help analyze bundle content
8787
--skip-plugins comma-separated list of plugin names to skip for this run

‎docs/zh/config/README.md

Copy file name to clipboardExpand all lines: docs/zh/config/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module.exports = {
6565
- Type: `string`
6666
- Default: `'dist'`
6767

68-
当运行 `vue-cli-service build` 时生成的生产环境构建文件的目录。注意目标目录在构建之前会被清除 (构建时传入 `--no-clean` 可关闭该行为)。
68+
当运行 `vue-cli-service build` 时生成的生产环境构建文件的目录。注意目标目录的内容在构建之前会被清除 (构建时传入 `--no-clean` 可关闭该行为)。
6969

7070
::: tip 提示
7171
请始终使用 `outputDir` 而不要修改 webpack 的 `output.path`

‎docs/zh/guide/cli-service.md

Copy file name to clipboardExpand all lines: docs/zh/guide/cli-service.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ npx vue-cli-service serve
7070
--modern 面向现代浏览器带自动回退地构建应用
7171
--target app | lib | wc | wc-async (默认值:app)
7272
--name 库或 Web Components 模式下的名字 (默认值:package.json 中的 "name" 字段或入口文件名)
73-
--no-clean 在构建项目之前不清除目标目录
73+
--no-clean 在构建项目之前不清除目标目录的内容
7474
--report 生成 report.html 以帮助分析包内容
7575
--report-json 生成 report.json 以帮助分析包内容
7676
--watch 监听文件变化

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

Copy file name to clipboardExpand all lines: packages/@vue/cli-service/lib/commands/build/index.js
+2-2Lines changed: 2 additions & 2 deletions
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 remove the dist directory contents 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.