-
Notifications
You must be signed in to change notification settings - Fork 82
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 extension for ESM build. #155
Comments
Thank you for pointing that out! I just pushed a fix that:
Let me know if that fixes it! |
Works for me, testing locally! I noted a few minor issues:
|
I forgot to post yesterday, all of these should be fixed now! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build tools that use native ESM (e.g. Vite) expect ESM builds to use the
.mjs
extension (unless the nearestpackage.json
has"type": "module"
, in which case CJS builds should use the.cjs
extension).See: https://nodejs.org/api/packages.html#determining-module-system
Currently, both the ESM and CJS builds use
.js
-- this causes Node to assume they are both CJS:Would you be willing to consider either adding
"type": "module"
to yourpackage.json
file, or renaming the built packages to e.g.color.esm.mjs
andcolor.cjs.js
?The text was updated successfully, but these errors were encountered: