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
fix: Set commonJS code as main
in package.json
#2276
Conversation
Change `main` to point to `./lib/marked.cjs` instead of `./lib/marked.esm.js` for compatibility with 'other' loaders (eg jest) in a non-ES module environment. Signed-off-by: Chris. Webster <chris@webstech.net>
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/markedjs/markedjs/6Jg5DMkvsjnaV1g4TuZ1XUsve8yy |
@benmccann this was changed in #2227. I just want to make sure this won't break what you were trying to fix. |
Yes, this change is fine with me. It's more common to put CJS as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
## [4.0.1](v4.0.0...v4.0.1) (2021-11-11) ### Bug Fixes * Set commonJS code as `main` in `package.json` ([#2276](#2276)) ([7e636d5](7e636d5))
🎉 This PR is included in version 4.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Change
main
to point to./lib/marked.cjs
instead of./lib/marked.esm.js
for compatibility with 'other' loaders (eg jest) in a non-ES module environment.This was tested in an ESM repo both directly (node) and under jest with no problems.
Marked version:
4.0.0
Description
Contributor
Committer
In most cases, this should be a different person than the contributor.