-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add Type: Module to Package.Json #47
Conversation
Woops thanks for the ping @ingalls, sorry about the error there! I'm no longer able to merge these PRs, but maybe @greenlaw or @AlexanderBelokon can take a look. |
I saw that after I cut this PR!! Congrats on the new gig! |
@ingalls I think this will break CJS imports if merged, is that your understanding? We just went through this on another repo and ended up using a dual-packaging approach. Can you take a look here and see if the same approach would work for you here? mapbox/sphericalmercator#47 |
@greenlaw Yes, you are correct, my head is 100% into ESM so I haven't dealt with compat with CJS in a bit but your approach in SM seems like the way to go to retain CJS support. I'd be happy to cut a PR following your approach with SM tomorrow if that would be useful. |
Thanks y'all! 🙌 |
@ingalls That would be great - thanks |
@greenlaw I've updated the PR with the same dual ESM/CJS approach you took in the SM library. Let me know if this looks good to you! Thanks all! |
@ingalls Looks good, just two minor things:
Happy to approve/merge once that's done. |
@greenlaw done. |
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 @ingalls !
v2.0.1 has been published 👍 |
👋 Hey @mapsam,
Thanks a ton for the TS migration, it's wonderful to replace my shims! The current version (2.0.0) is causing some issues with my deploy tooling as the TS package uses Module
exports
syntax without declaring itself a module.I've added the
type: module
in the package.json required to allow use ofexports
instead ofmodule.exports