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

feat: esm-only #1173

Merged
merged 13 commits into from
Oct 30, 2022
Merged

feat: esm-only #1173

merged 13 commits into from
Oct 30, 2022

Conversation

tmm
Copy link
Member

@tmm tmm commented Oct 26, 2022

Description

This PR converts wagmi from bundling both CJS + ESM, to bundling pure ESM.

This will probably affect tooling that is sensitive to importing ESM such as Jest and Remix. We might need to create some additional guides on how to use wagmi with these tools as we move to pure ESM.

Evolution of #933 using tsup instead of patching Preconstruct

Fixes #838
Fixes #1004

Additional Information

Your ENS/address: awkweb.eth

@vercel
Copy link

vercel bot commented Oct 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
wagmi ✅ Ready (Inspect) Visit Preview Oct 28, 2022 at 5:11PM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2022

🦋 Changeset detected

Latest commit: a1b5b9f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@wagmi/core Minor
wagmi Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

babel.config.js Show resolved Hide resolved
packages/react/tsup.config.ts Outdated Show resolved Hide resolved
@tmm tmm marked this pull request as ready for review October 27, 2022 22:12
@jxom jxom self-requested a review October 28, 2022 05:29
Copy link
Member

@jxom jxom left a comment

Choose a reason for hiding this comment

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

Looks great! Would be sweet to have some docs around using wagmi w/ tooling that doesn't have first-class support for ESM such as Jest + Remix!

@tmm tmm changed the title feat: pure esm feat: esm-only Oct 28, 2022
@tmm tmm changed the base branch from main to 0.8.x October 30, 2022 21:05
@tmm tmm merged commit d68afa7 into 0.8.x Oct 30, 2022
@tmm tmm deleted the tmm/tsup-esm branch October 30, 2022 21:08
@tmm tmm mentioned this pull request Oct 30, 2022
1 task
tmm added a commit that referenced this pull request Nov 9, 2022
* docs: start migration guide

* feat: esm-only (#1173)

* wip: set up tsup

* wip: working examples

* build: tsc

* fix: recursive conditional return types

* refactor: remove preconstruct references

* feat: dev mode

* refactor: tsup config

* chore: add changeset

* build: validate exports

* fix: jsx runtime import issue

* chore: add types to package.json exports

* refactor: addressOrName to address (#1203)

* refactor: remove deprecated testnets + make `apiKey` required (#1185)

* feat: make apiKey required on providers

* tech-debt: remove deprecated testnets

* chore: docs + changesets

* chore: update tsdoc

* chore: update migration guide

* fix: lint error

Co-authored-by: jxom <jakemoxey@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No wagmi client found in Code Sandbox bug: Connector not found
2 participants