Conversation
📝 WalkthroughWalkthroughExpanded the chunking rule in vite.config.mts to group additional crypto dependencies ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-08-12T17:52:34.672ZApplied to files:
📚 Learning: 2025-08-12T17:53:56.322ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Fix production white screen caused by
@noble/curvescircular dependency initialization error.The hdwallet bump from 1.62.25 to 1.62.28 brought in
@ledgerhq/hw-app-btc@10.13.0, which depends on@noble/curves@1.9.7,@noble/secp256k1, and@bitgo/secp256k1. The existingmanualChunksconfig put@ledgerhqinto a'ledger'chunk, but its crypto dependencies ended up in different chunks. This created cross-chunk circular dependencies that causedCannot access before initializationerrors in the production build.The fix bundles
@noble,@scure, and@bitgopackages into the same chunk as@ledgerhqto ensure they initialize together.Issue (if applicable)
Current release blocker.
Risk
Medium Risk - This modifies the Vite/Rollup chunking strategy. The change groups related crypto packages together, which should only improve bundle cohesion. Without this fix, production is completely broken (white screen).
@noble/curvesor@noble/secp256k1for cryptographic operationsTesting
Engineering
yarn build:webOperations
Screenshots (if applicable)
N/A - This is a build configuration fix with no UI changes.
Note
Updates Vite manualChunks to bundle @noble, @Scure, and @BitGo with @LedgerHQ under the
ledgerchunk to avoid cross-chunk issues.includes('@ledgerhq')withmatch(/(@ledgerhq|@noble|@scure|@bitgo)/)to group related crypto deps into theledgerchunk.Written by Cursor Bugbot for commit 6c9ba0a. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.