Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 22d6ad9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
jxom
commented
Sep 12, 2022
| serverBuildDirectory: 'build', | ||
| devServerPort: 8002, | ||
| ignoredRouteFiles: ['.*'], | ||
| serverDependenciesToBundle: [/^@?wagmi.*/, 'zustand/vanilla'], |
Member
Author
There was a problem hiding this comment.
jxom
commented
Sep 12, 2022
| @@ -0,0 +1,949 @@ | |||
| # Source: https://github.com/preconstruct/preconstruct/compare/main...jxom:preconstruct:tmm/esm-support | |||
jxom
commented
Sep 12, 2022
| { | ||
| "main": "dist/wagmi-core-chains.cjs.js", | ||
| "module": "dist/wagmi-core-chains.esm.js" | ||
| "main": "dist/wagmi-core-chains.esm.js", |
Member
Author
There was a problem hiding this comment.
Ideally, we don't even need these package.json's since we can just rely on package.json#exports, but we may need them for a couple of reasons:
- Some tooling (Jest) don't respect the
exportsfield, and - Setting
moduleResolutionto anything other thannode16ornodenextintsconfig.jsonbreaks type resolution without this. However, if we do setmoduleResolutionto one of those values, we need to append the.jsextension to every relative import ¯_(ツ)_/¯. There are long running issues for this here and here.
jxom
commented
Sep 13, 2022
| @@ -1,5 +1,5 @@ | |||
| import { BigNumber, logger } from 'ethers/lib/ethers' | |||
| import { Logger, formatUnits, isAddress } from 'ethers/lib/utils' | |||
| import { BigNumber, logger } from 'ethers/lib/ethers.js' | |||
Member
Author
There was a problem hiding this comment.
Is there a reason why we aren't using ethers here? Should I move to that?
1 task
Member
|
opening up PR with different approach shortly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR converts
wagmifrom bundling both CJS + ESM, to bundling pure ESM.I have published the packages to NPM as a snapshot release under the tag
esm-only(npm i wagmi@esm-only).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.