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 unpkg and jsdelivr fields to package.json #384
Conversation
Hey thanks! I wonder why they don't support |
Note: You can always use |
There's a lot of bundle history so I might be missing something, but as far as I can tell, microbundle coined umd:main, and unpkg predates it by quite a while, as does jsdelivr. Surprisingly nobody's asked about umd:main on the unpkg issue tracker, but also notably microbundle switched to recommending the unpkg field. Like the rest of JavaScript modules, it's… chaotic. Yep, though bundle.run works, it’s a bigger piece of infrastructure to maintain than the NPM CDNs, so it’s often slow or crashed. |
Cool, thanks for the insight! |
Maybe |
I think getting rid of |
@jimaek Yo, can you weigh in here? Q: Why can't jsDelivr et al look for an existing |
Oh, the jsDelivr server isn't open source, so I don't see why we should cater to them. |
How ubiquitous is jsDelivr? |
Meh, I've overblown this. I'm just gonna merge. 😂 |
🎉 This PR is included in version 3.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Immer already has a UMD build, which is great! This PR adds jsdelivr and unpkg fields in package.json pointing to the same place, so jsdelivr.com and unpkg.com respectively can automatically serve the right files, and AMD implementations that depend on one or both of those (like d3-require) can automatically load immer directly or as a dependency.