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

Use tsc #74

Closed
wants to merge 5 commits into from
Closed

Use tsc #74

wants to merge 5 commits into from

Conversation

jcbhmr
Copy link
Collaborator

@jcbhmr jcbhmr commented Jun 3, 2023

This PR would...

This is intended to be a non-breaking migration from rollup to tsc. Later #55 can be considered with the move to ESM-only

THIS DOES NOT SOLVE THE DUAL PACKAGE HAZARD ISSUE!

@jcbhmr jcbhmr self-assigned this Jun 3, 2023
@jcbhmr jcbhmr requested a review from mesqueeb June 3, 2023 23:42
@jcbhmr
Copy link
Collaborator Author

jcbhmr commented Jun 5, 2023

There's an open issue on typescript github to support changing file extensions at tsc buildtime. That hasn't been encouraged since it's mostly used to cause the not-so-great dual package hazard. Instead TS team seems to recommend that you just build an ESM or CJS and then wrap it in another .mjs or .cjs file as a facade for the other module system. microsoft/TypeScript#49462

@jcbhmr
Copy link
Collaborator Author

jcbhmr commented Jun 5, 2023

I used a tricksy hack to make the cjs folder treat .js as .cjs by putting a {"type":"commonjs"} package.json in there 😆

@jcbhmr jcbhmr mentioned this pull request Jun 6, 2023
4 tasks
@jcbhmr
Copy link
Collaborator Author

jcbhmr commented Jun 6, 2023

@mesqueeb This is the next PR that I think should be tackled 😊

@jcbhmr jcbhmr mentioned this pull request Jun 6, 2023
3 tasks
@mesqueeb
Copy link
Owner

mesqueeb commented May 2, 2024

closing in favour of #87

@mesqueeb mesqueeb closed this May 2, 2024
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.

2 participants