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

feat: move to ESM first #91

Closed
wants to merge 1 commit into from
Closed

Conversation

userquin
Copy link
Member

Right now we have:

imagen

Moving to ESM first:

imagen

@userquin
Copy link
Member Author

we should also update node to 16 or maybe to 18...

@antfu
Copy link
Member

antfu commented Aug 11, 2023

I am not sure. In many usage the vite.config.ts might be a CJS. Requiring for dynamic import is not really worth it to me. And I don't actually mind to have "Masqureading CJS types"

@userquin userquin closed this Aug 11, 2023
@userquin userquin deleted the userquin/feat-move-to-esm-first branch August 11, 2023 15:03
@sxzz
Copy link
Collaborator

sxzz commented Aug 11, 2023

@antfu We need to copy xxx.d.ts to xxx.d.mts. The first dts is for CJS and the second one is for ESM, like I done in unplugin

@userquin
Copy link
Member Author

userquin commented Aug 11, 2023

@sxzz maybe we can have CJS and ESM configured properly, something like this:
fabian-hiller/valibot#12 (comment)

@antfu
Copy link
Member

antfu commented Aug 11, 2023

On the opposite, unjs/unbuild#273, I thought that TS will look for the corresponding types based on the file name in node16

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