Repository navigation
perf: cut initial bundle size by 44% - #320
Merged
Merged
Conversation
The main bundle loaded Material overlay code, the en-AU locale, cloud uploads and date-fns at start-up, though start-up does not use them. - Load the snackbar lazily. Notifications made before it loads open when it does. - Defer the upload list, update toast and global banner. Use standalone Material directives, as @defer cannot defer NgModules. - Load the en-AU fallback locale as a lazy chunk. Start-up waits for it. - Import the tenant expiry helper only for sys-admins. Format the build-time debug log with Intl. - Remove the dead Sentry call and the unused setToken method. main: 824.6 kB -> 461.6 kB raw, 194.9 kB -> 122.4 kB transfer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Problem
The initial
mainbundle was 824.6 kB raw (194.9 kB transfer). Most of it was code start-up does not use: the Material/CDK overlay stack (snackbar, tooltip, dialog), the inlined en-AU locale (52 kB),@placeos/cloud-uploads,date-fnsand a dead Sentry call.Solution
setNotifyOutletalso accepts a promise. Notifications made before the snackbar module loads open when it does.@deferfor the upload list, update toast and global banner. These were the only root-level users of tooltip, dialog, ripple and cloud uploads. The upload list loads on idle, so drag-and-drop uploads still work almost at once.MatTooltip,MatProgressBar,MatRipple) in root components, as@defercannot defer NgModules.LocaleService.readyresolves when it loads. Start-up always waits for it (same 5 s cap as before) before the shell renders.date-fnsout of start-up. The tenant expiry helper is imported only for sys-admins. The build-time debug log usesIntl.withScopecall did nothing (Sentry is never initialised).setTokenhad no callers. This also dropsts-md5frommain.syncUploadToken()call. Each upload already calls it.mainbeforemainafterTesting
@sentry/browseris now unused and can be removed frompackage.jsonin a follow-up.Changes made by Claude Opus 5.5 (1M context) in Claude Code, running in T3 Code.
🤖 Generated with Claude Code