Skip to content

api.appData.outputPath 为 undefined 会导致配置了 forkTSChecker 的项目从根部被完全删除 #41

@tommytroylin

Description

@tommytroylin

api.onBuildComplete(async ({ err }) => {
if (err && api.userConfig.forkTSChecker) {
// rspack's type checking output will continue to be generated, to avoid interfering with subsequent processes, manually remove the file if it exists
const absOutputPath = pathe.join(api.cwd, api.appData.outputPath)
if (await fsExtra.exists(absOutputPath)) {
await fsExtra.remove(absOutputPath)
}
}
})

api.appData.outputPath undefined
api.paths.absOutputPath "/Users/Tommy/project-playground/kmi-bug/dist"
info  - Umi v4.4.12

需要换成 api.paths.absOutputPath

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions