Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/ant-pro/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ screenshot
.eslintcache

build
.takumi/todos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Gitignore Includes Personal Todo File

The .takumi/todos file was accidentally added to .gitignore. This appears to be personal/temporary content unrelated to the main feature.

Locations (1)

Fix in CursorFix in Web

19 changes: 18 additions & 1 deletion packages/bundler-shared-config/src/provider/BaseBundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
Stats,
} from '@kmijs/bundler-shared/rspack'
import type { Configuration } from '@kmijs/bundler-shared/rspack'
import { logger } from '@kmijs/shared'
import { logger, rimraf } from '@kmijs/shared'
import { Env, type IUserConfig } from '../types'
import { esbuildCompressErrorHelper } from '../utils/esbuildCompressErrorHelper'
import type {
Expand Down Expand Up @@ -72,6 +72,23 @@ export abstract class BaseBundler<
let isFirstCompile = true

return new Promise((resolve, reject) => {
if (opts.clean) {
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clean option should be validated to ensure it's a boolean type. Without type checking, unexpected values could cause runtime errors or unexpected behavior.

Copilot uses AI. Check for mistakes.
bundlerConfigs.forEach((config) => {
if (config.output?.path) {
try {
logger.verbose(
`[BaseBundler] Cleaning output directory: ${config.output.path}`,
)
rimraf.sync(config.output.path)
} catch (error) {
logger.verbose(
`[BaseBundler] Cleaning output directory: ${config.output.path} failed`,
)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Error Logging Missing in Directory Cleanup

When cleaning the output directory fails, the catch block logs a generic failure message without including the actual error details. This omission makes debugging difficult as the root cause of the cleaning failure is not logged. The error variable should be included in the log message.

Locations (1)

Fix in CursorFix in Web

}
})
}

const compiler = this.createCompiler({
...buildOptions,
bundlerConfigs,
Expand Down