Skip to content

Use .mjs extensions for ESM#352

Merged
SupremeTechnopriest merged 3 commits intoSupremeTechnopriest:masterfrom
rtsao:patch-1
Mar 20, 2026
Merged

Use .mjs extensions for ESM#352
SupremeTechnopriest merged 3 commits intoSupremeTechnopriest:masterfrom
rtsao:patch-1

Conversation

@rtsao
Copy link
Copy Markdown
Contributor

@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
Copy Markdown

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
Copy Markdown

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.

@pimmee
Copy link
Copy Markdown

pimmee commented Dec 27, 2024

Any reason this is not merged yet? 🙏 I'm also hitting this issue when using ESM.

@csantos1113
Copy link
Copy Markdown

Could we get this merged please 🙏 thanks!

@SupremeTechnopriest SupremeTechnopriest merged commit 52a4f28 into SupremeTechnopriest:master Mar 20, 2026
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.

5 participants