fix: add starknet code splitting to reduce bundle size#11582
fix: add starknet code splitting to reduce bundle size#115820xApotheosis merged 1 commit intodevelopfrom
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughModified Vite configuration to route Starknet-related packages ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (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 |
|
I'm going to push this one through to fix CI. |
Description
PR #11552 added
@avnu/avnu-sdkfor Starknet token swaps, which pulled in the heavystarknetSDK. This increased the main source map from ~24 MB to 26.7 MB, exceeding Cloudflare Pages' 26.2 MB file limit and breaking CI deploys.This PR adds starknet dependencies to Vite's
manualChunksconfiguration, splitting them into a separate chunk following the existing pattern for other heavy dependencies like@solana,@ledgerhq, etc.Result:
main-*.js.mapstarknet-*.js.mapIssue (if applicable)
Fixes CI deploy failures on develop branch.
Risk
Low risk - this only affects Vite's chunk splitting configuration. The same code is delivered to users, just in a separate chunk file. This follows the established pattern already used for Solana, Ledger, and other heavy dependencies.
None - this is a build configuration change only.
Testing
A quick app spot check around trades would not go a stray!
Engineering
yarn build:webstarknet-*.jschunk exists inbuild/assets/.mapfile exceeds 26.2 MB:find build/assets -name '*.map' -exec ls -lh {} \; | sort -hr -k5 | head -5Operations
This is a build infrastructure fix with no user-facing changes.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.