Skip to content

Infinite rebuild loop in watch mode when outDir is not dist in multi-config setup #315

@Kh4f

Description

@Kh4f

Reproduction link or steps

Reproduction: https://bolt.new/~/github-v69gmpbw

Steps to reproduce manually:

  1. Create a configuration file with two objects, where one of them has an outDir option not set to dist. For example:
export default defineConfig([
  { entry: './src/index.ts' },
  { entry: './src/cli.ts', outDir: 'bin' }
])
  1. Run pnpm tsdown -w
  2. Change some source code in index.ts or cli.ts

What is expected?

Only one rebuild should be triggered.

What is actually happening?

The rebuild process enters an infinite loop.

Any additional comments?

Thanks a lot for this awesome tool! It's exactly what I’ve been looking for to build TS libs with minimal config. Really happy I discovered it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions