Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type-safe-api): revert add compilation to ESM for TypeScript #575

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

cogwirrel
Copy link
Member

Reverts #561

Unfortunately, it seems as though this combination of module and moduleResolution no longer works as of TypeScript 5.2.

With TS 5.2, we get the error:

tsconfig.esm.json(4,15): error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'.

See: https://www.totaltypescript.com/concepts/option-module-must-be-set-to-nodenext-when-option-moduleresolution-is-set-to-nodenext#solution-2

It seems as though with TS 5.2 it's tricky to build hybrid esm/cjs packages: microsoft/TypeScript#55705

So unfortunately reverting this as the path of least resistance for now. Sorry @zetashift ! :(

@cogwirrel cogwirrel changed the title Revert "feat(type-safe-api): add compilation to ESM for TypeScript" fix(type-safe-api): revert add compilation to ESM for TypeScript Sep 13, 2023
@cogwirrel cogwirrel merged commit 6637287 into mainline Sep 13, 2023
@cogwirrel cogwirrel deleted the revert-561-feat-add-esm-comp branch September 13, 2023 08:29
@zetashift
Copy link
Contributor

Ha, classic CJS vs ESM! Well I do love the path of least resistance :P, so all good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants