Skip to content

build: use tshy to support both CJS and ESM dist artifacts #3616

Open
@petermetz

Description

Description

We've struggled a lot with ESM/CJS incompatibilities and it's not a settled question still.

The scope of this task is to evaluate the tshy tool.

I've recently seen a new-ish tool that I haven't tried before that could help us with making CJS and ESM work together more seamlessly by refactoring the TS compilation output directory structure (or at least that's what it sounds like based on the first link)

Source 1: https://colinhacks.com/essays/live-types-typescript-monorepo
Source 2: https://github.com/isaacs/tshy

Acceptance Criteria

  1. The "are the types wrong" checks are passing.
  2. Build is not slower than before (or only a little bit slower if it must be)
  3. The watch scripts still work (yarn watch-tsc)

cc: @outSH

Metadata

Assignees

No one assigned

    Labels

    P4Priority 4: LowbacklogTasks that are needed but we cannot prioritize them at present.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions