Skip to content

Commit

Permalink
fix: clean 选项拼写问题
Browse files Browse the repository at this point in the history
  • Loading branch information
bigmeow committed Jun 28, 2023
1 parent 5cf4ed5 commit 35a99b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/taro-service/src/platform-plugin-base/mini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export abstract class TaroPlatformBase<T extends TConfig =TConfig> extends TaroP

private setupImpl () {
const { output } = this.config
// 仅 output.clear 为 false 时不清空输出目录
// 仅 output.clean 为 false 时不清空输出目录
// eslint-disable-next-line eqeqeq
if (output == undefined || output.clear == undefined || output.clear === true) {
if (output == undefined || output.clean == undefined || output.clean === true) {
this.emptyOutputDir()
} else if (isObject(output.clear)) {
this.emptyOutputDir(output.clear.keep || [])
} else if (isObject(output.clean)) {
this.emptyOutputDir(output.clean.keep || [])
}
this.printDevelopmentTip(this.platform)
if (this.projectConfigJson) {
Expand Down
8 changes: 4 additions & 4 deletions packages/taro-service/src/platform-plugin-base/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ export abstract class TaroPlatformWeb<T extends TConfig = TConfig> extends TaroP

private setupWebApp () {
const { output } = this.config
// H5 中 webpack5 原生支持 output.clear 选项,但是 webpack4 不支持, 为统一行为,这里做一下兼容
// H5 中 webpack5 原生支持 output.clean 选项,但是 webpack4 不支持, 为统一行为,这里做一下兼容
// eslint-disable-next-line eqeqeq
if (output == undefined || output.clear == undefined || output.clear === true) {
if (output == undefined || output.clean == undefined || output.clean === true) {
this.emptyOutputDir()
} else if (isObject(output.clear)) {
this.emptyOutputDir(output.clear.keep || [])
} else if (isObject(output.clean)) {
this.emptyOutputDir(output.clean.keep || [])
}
this.printDevelopmentTip()
}
Expand Down

0 comments on commit 35a99b4

Please sign in to comment.