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 .mjs extensions for ESM #352

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rtsao
Copy link

@rtsao rtsao commented Jun 16, 2023

Node interprets packages as CommonJS unless package "type": "module" is declared or .mjs extension is used.

This PR resolves this problem by using .mjs extensions for the ESM bundle.

@vercel
Copy link

vercel bot commented Jun 16, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @SupremeTechnopriest on Vercel.

@SupremeTechnopriest first needs to authorize it.

@alexfreska
Copy link

Hey @SupremeTechnopriest thank you for the great package.

I am also hitting this issue, this package cannot be used in a package that gets imported into nextjs, here is some more context: vercel/next.js#39375 (comment) I tried manually changing to .mjs like this PR does, and it works great.

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.

None yet

2 participants