Skip to content

Setting tsBuildInfoFile directory in vite-react causes issues in monorepo setup #341

@thdk

Description

@thdk

The vite-react config sets a value for tsBuildInfoFile to node_modules/.tmp/tsconfig.app.tsbuildinfo here:
https://github.com/tsconfig/bases/blob/main/bases/vite-react.json#L7

When two (or more) react projects in a monorepo extend from @tsconfig/vite-react, then only a single tsconfig.app.tsbuildinfo file will be created since package managers will deduplicate dependencies. This causes unexpected behavior such as the cache never be used as it's being overwritten by any sequential build from the other project.

Repro: https://github.com/thdk/typescript-project-references-shared-tsbuildinfo-issue-repro

Can be that this is fine for most users, so feel free to close if this is by design.

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