Skip to content
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: improve ESM output to support Deno, Bun and Edge runtimes #29

Merged
merged 1 commit into from
Dec 25, 2022

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Aug 26, 2022

Supersedes #13.
Based on new research and findings on how conditional package exports actually works in Bun, Deno, Cloudflare Workers and Edge runtimes.

Blocked by sanity-io/get-it#25

Testable by

npm i @sanity/client@esm

As well as

const {default: createClient} = await import('https://esm.sh/@sanity/client@esm')
const {default: createClient} = await import('https://cdn.skypack.dev/@sanity/client@esm')

Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Have not tested this in all environments, but trust that you have and the tests we have in place are sufficient :)

Still think we should release this as a major version, just in case.

@stipsan stipsan marked this pull request as ready for review December 25, 2022 20:42
@stipsan stipsan merged commit 5ef19d4 into main Dec 25, 2022
@stipsan stipsan deleted the improve-esm branch December 25, 2022 20:44
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2023

🎉 This PR is included in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants