Skip to content

Commit

Permalink
fix: support for nodenext module (#1678)
Browse files Browse the repository at this point in the history
* fix: nodenext module support

* fix: changeset

* chore: remove index.ts

* Revert "chore: remove index.ts"

This reverts commit 048b115.

* chore: tweak changeset

* revert: force react import

---------

Co-authored-by: Daniel Sinclair <d@niel.nyc>
  • Loading branch information
magiziz and DanielSinclair committed Jan 3, 2024
1 parent b7e6420 commit 24b5a88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-bobcats-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rainbow-me/rainbowkit": patch
---

Improved support for `NodeNext` module resolution to resolve `"@rainbow-me/rainbowkit"' has no exported member 'RainbowKitProvider'` TypeScript warnings
4 changes: 0 additions & 4 deletions packages/rainbowkit/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ const mainBuild = esbuild.build({

// esbuild needs these additional entry points in order to support tree shaking while also supporting CSS
...(await getAllEntryPoints('src/themes')),

// The build output is cleaner when bundling all components into a single chunk
// This is done assuming that consumers use most of the components in the package, which is a reasonable assumption for now
'./src/components/index.ts',
],
outdir: 'dist',
watch: isWatching
Expand Down
4 changes: 3 additions & 1 deletion packages/rainbowkit/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export * from './components';
export { ConnectButton } from './components/ConnectButton/ConnectButton';
export { WalletButton } from './components/WalletButton/WalletButton';
export { RainbowKitProvider } from './components/RainbowKitProvider/RainbowKitProvider';
export { getDefaultWallets } from './wallets/getDefaultWallets';
export { getWalletConnectConnector } from './wallets/getWalletConnectConnector';
export { connectorsForWallets } from './wallets/connectorsForWallets';
Expand Down

2 comments on commit 24b5a88

@vercel
Copy link

@vercel vercel bot commented on 24b5a88 Jan 3, 2024

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 24b5a88 Jan 3, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.