-
Notifications
You must be signed in to change notification settings - Fork 564
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
Switch to ESM #348
Switch to ESM #348
Conversation
Before merging this in we should agree on a strategy in #346. |
@jonkoops if we're compiling anyway, why not TypeScript native? Seeing as we're only 1 file deep for each of the exports, you won't need a bundler either |
I made an example project in https://github.com/dcousens/monorepo-typescript recently which I'm often using as a reference for this kind of project lift, albeit for monorepos |
You are referring to Rollup in the I think a bundler/compiler (e.g Rollup/TypeScript would make sense if we decide to also support CommonJS next to ESM, but I am not sure if we would want to do so. Perhaps we merge this in now, and make this a separate point of discussion/log an isssue? WDYT? |
We might see slower uptake of
Happy, this is 90% of the work, changing to TS and bundling can easily be a separate discussion, but it needs to be resolved if we want to support CJS. |
Please don't do this. Although many people do so, TypeScript isn't intended to be used for dual publishing. Especially the combination of TypeScript, default exports, and Rollup is a well-known recipe for generating invalid type definitions. |
Let's continue the CommonJS/TypeScript discussion under #349, and focus on landing this work here. |
@dcousens WDYT? Can we merge this in? |
Closes #238