Repository navigation
fix(site): keep the browse page's hero out of the products bundle - #62491
Merged
Merged
Conversation
There was a problem hiding this comment.
The bundle check fails on the base and passes with this change. I ran vite build and check-client-bundle.ts in both checkouts. On the base, /product/browse measures 115.3 kB against its 99 kB budget, and the check fails. With this change it measures 103.4 kB against the new 106 kB budget and the check passes. The product pages measure 124.6 kB. The site's tests (192 pass) and tsc are clean, and no importers of the moved helpers' old locations are left.
The public API is unchanged: this only moves internal site helpers between modules.
No concerns.
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.
#62487 made
ProductHeroimportprefersReducedMotionandrescueMediafromproducts.tsxandpageSchemefromvideos.ts, which pulled the whole products bundle into/product/browse. The page went to 116.9 kB against its 99 kB budget, sodeploy-sitefails oncheck-client-bundle.prefersReducedMotion,rescueMediaandpageSchememove tomedia.tsx, andheroStillsmoves toproduct-hero.tsx. Callers import them from there.media.tsxwith the stills manifest (3.9 kB), which the hero needs for its AVIF and WebP copies. Its budget goes from 99 to 106, measured plus a kB, as the comment there asks. The product pages stay at 126.2 kB.Full
bun run buildpasses locally.No flag needed. This fixes the build.
Visual