Skip to content

clean is not respected on format.outDir #843

@dmurvihill

Description

@dmurvihill

Reproduction link or steps

import { defineConfig } from "tsdown";

export default defineConfig({
  clean: true,
  format: {
    "esm": {
      outDir: 'esm/',
    },
    "cjs": {
      outDir: 'cjs/',
    },
  }
});

What is expected?

Put some junk in the esm/ and cjs/ folders and run tsdown. It should be cleaned up.

What is actually happening?

It doesn't get cleaned up.

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions