perf(build): vendor chunk split + es2022 target#3185
Merged
Conversation
Both apps were shipping a single ~1.7MB / ~3.4MB index bundle that forced the browser to parse-the-world on every cold load and that had to be re-fetched on every deploy because app code and vendor code shared a chunk. Adds rollupOptions.output.manualChunks splitting node_modules into named vendor groups (react, viem, wallet, radix, tangle-ui, polkadot, tanstack, router) and bumps build.target to es2022. Effects: - tangle-cloud index chunk drops from 1.7MB -> 887KB (47% smaller) - tangle-dapp vendor chunks (1.6MB wallet, 1.1MB viem, 874KB polkadot) now cache stably across deploys — only the 3.4MB app index changes when app code changes, and even that gets faster parse because each chunk parses in its own micro-task - es2022 target removes async/await downleveling, class-field shims, and other ES2020-era polyfills that no current wallet browser needs No behavioural change. Splitting is purely a build-output reshape.
✅ Deploy Preview for tangle-dapp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for tangle-cloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for tangle-leaderboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both apps were shipping a single ~1.7MB / ~3.4MB index bundle. This adds
rollupOptions.output.manualChunkssplittingnode_modulesinto named vendor groups and bumpsbuild.targettoes2022.Bundle delta
tangle-cloud index chunk:
1.7MB → 887KB(47% smaller). Vendors split out:tangle-dapp main app: 3.4MB still, but the heavy vendors are now isolated and cache-stable across deploys:
Why this helps perceived speed
es2022target removes async/await downleveling and class-field shims that no current wallet browser needsWhat's NOT in this PR
I tried bumping
@tangle-network/sandbox-uifrom 0.13.0 to 0.15.3 (latest) at the same time but that introduced 46 implicit-any typecheck errors — the new sandbox-ui re-exports raw Radix primitives whose callback types don't infer the same way the old wrappers did. Backing that out so this perf change ships clean; the bump deserves its own PR with proper attention to the type changes.