Problem Statement
next.config.ts webpack config sets seven wallet-related packages to false aliases:
"@walletconnect/ethereum-provider": false,
"@safe-global/safe-apps-sdk": false,
...
These declarations effectively "delete" those wallet SDKs from the bundle, breaking any code path that imports them. There is no graceful fallback — the request simply fails to resolve.
Why It Matters
The aliases were added to shrink bundle size, but they conflict with wagmi's connector detection: any connector that lazy-loads one of these SDKs fails to instantiate. Users who connect via WalletConnect v2 or a Safe (multi-sig) wallet silently cannot transact.
Acceptance Criteria
- Wallet SDKs are gated behind
next/dynamic lazy imports, not alias blackholes
- A user can connect via WalletConnect v2, Safe, Coinbase, and MetaMask without errors
- Bundle-size impact is bounded (no more than +25KB on initial)
- Storybook story for each connector type passes its smoke test
Implementation Notes
Convert alias map to a list of pre-bundled dynamic-import paths and run next/dynamic(() => import('@walletconnect/ethereum-provider'), { ssr: false }) from each connector's mount.
Files Likely Affected
next.config.ts
src/lib/walletConnectors/*
src/components/WalletConnector.tsx
Difficulty / Effort
- Difficulty: Moderate
- Effort: T-Shirt M
Labels
bug, priority:critical, area:web3, area:bundling
Problem Statement
next.config.tswebpack config sets seven wallet-related packages tofalsealiases:These declarations effectively "delete" those wallet SDKs from the bundle, breaking any code path that imports them. There is no graceful fallback — the request simply fails to resolve.
Why It Matters
The aliases were added to shrink bundle size, but they conflict with
wagmi's connector detection: any connector that lazy-loads one of these SDKs fails to instantiate. Users who connect via WalletConnect v2 or a Safe (multi-sig) wallet silently cannot transact.Acceptance Criteria
next/dynamiclazy imports, not alias blackholesImplementation Notes
Convert alias map to a list of pre-bundled dynamic-import paths and run
next/dynamic(() => import('@walletconnect/ethereum-provider'), { ssr: false })from each connector's mount.Files Likely Affected
next.config.tssrc/lib/walletConnectors/*src/components/WalletConnector.tsxDifficulty / Effort
Labels
bug,priority:critical,area:web3,area:bundling