Skip to content

Commit 29bc2f0

Browse files
committed
rebase
1 parent 73e4a63 commit 29bc2f0

2 files changed

Lines changed: 4308 additions & 10245 deletions

File tree

apps/zerodev-signer-demo/next.config.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@ const nextConfig: NextConfig = {
88
'@zerodev/wallet-react-ui',
99
'@zerodev/wallet-core',
1010
],
11-
// Force a single wagmi / @wagmi/core instance in the bundle. wagmi exposes
12-
// its config through React Context; if two physical copies end up loaded,
13-
// `WagmiProvider` and `useConfig` reference different Contexts and hooks
14-
// throw WagmiProviderNotFoundError. Duplicates can arise whenever the same
15-
// wagmi version is resolved with different (optional) peer-dependency
16-
// contexts across paths — common in workspaces. Aliasing both packages to
17-
// this app's node_modules guarantees every import resolves to the same
18-
// module identity.
11+
// Force a single wagmi / @wagmi/core / @tanstack/react-query instance in the
12+
// bundle. Each exposes state through a React Context (WagmiProvider config,
13+
// QueryClientProvider client). If two physical copies end up loaded, provider
14+
// and consumer reference different Contexts and hooks throw (e.g.
15+
// WagmiProviderNotFoundError, "No QueryClient set"). Duplicates arise
16+
// whenever the same version resolves under different (optional) peer
17+
// contexts — the workspace pulls react@19.2.3 through the Expo/RN side and
18+
// react@19.2.0 through the demo, so pnpm splits @tanstack/react-query into
19+
// two variants. Aliasing to this app's node_modules pins every import to the
20+
// same module identity.
1921
webpack: (config) => {
2022
config.resolve.alias = {
2123
...config.resolve.alias,
2224
wagmi: path.resolve(__dirname, 'node_modules/wagmi'),
2325
'@wagmi/core': path.resolve(__dirname, 'node_modules/@wagmi/core'),
26+
'@tanstack/react-query': path.resolve(
27+
__dirname,
28+
'node_modules/@tanstack/react-query',
29+
),
2430
}
2531
return config
2632
},

0 commit comments

Comments
 (0)