Repository navigation
ci(bundle): record what the HTML of five docs pages preloads - #1483
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
Bundle sizeClient 804.7 kB (no change) · Server 1.60 MB No route loads 100 B more or less before it renders. Brotli sizes. Changes under 100 B are left out of the tables. Measured by nuxt-bundle-analyzer for |
…r layer nuxt-bundle-analyzer#27 replaced --prerender and the layer with --urls, which renders only the URLs it lists. Both runs of a pull request now read the same list from the workflow, so the base no longer copies the layer from the pull request. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d04f-d58d-71d8-a3ce-f9f02763ca25
0.2.0 released --urls from atinux/nuxt-bundle-analyzer#27, so the workflows go back to npx instead of building the pull request's commit, and the comment workflow uses the same version.
atinux
marked this pull request as ready for review
November 13, 2026 10:06
atinux
approved these changes
Nov 13, 2026
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.
Updated by an AI agent on behalf of @atinux for nuxt-bundle-analyzer 0.2.0, whose
--urlsflag (atinux/nuxt-bundle-analyzer#27) replaces--prerenderand the layer.Why
Every docs page shares one route,
[[lang]]/[...slug].vue, so the bundle comment and bundle.nuxt.dev show the same initial load for all of them. That number follows static imports only and misses the lazy components a page renders, such as the prose components of its Markdown, which the HTML preloads. On/en, the HTML preloads 537.4 kB of Brotli JS and CSS against 293.7 kB for its route.What changed
bundle-size.ymlandbundle-size-history.yml: the analyzer runs with--urls "$NUXT_BUNDLE_ANALYZER_URLS", so each run renders only/en,/en/getting-started/installation,/en/essentials/components,/en/essentials/code-blocksand/en/essentials/images-embeds, and records what their HTML preloads. The last two loadProseImg(37.2 kB) andProseCodeTree,ProseCodeGroupandProseCodeCollapse(6.4 kB together), which the other pages don't. Both workflows list the same URLs inenv. Inbundle-size.yml, both jobs read the list from this pull request's workflow, so the base and the pull request render the same pages.bundle-size.yml,bundle-size-history.ymlandbundle-size-comment.ymlrun[email protected]withnpx, the release with--urls, instead of0.1.7.Evidence
The analyze step of
bundle-size.yml, run locally on this branch withnpx --yes [email protected] docs --extends ../layer --urls "$NUXT_BUNDLE_ANALYZER_URLS" --no-serve(exit 0). Nitro starts from the 23 routes Docus and its modules add, and--urlsleaves out all but five:The
analyze (base)andanalyze (pr)jobs of this pull request logged the sameRecorded 5 prerendered pages.with the pull request's build of #27./en/en/getting-started/installation/en/essentials/components/en/essentials/code-blocks/en/essentials/images-embedsWith every
/enpage prerendered, these five pages preload all the files the others do except about 2.6 kB:ProseOl,ProseEm,ProseBlockquote,ProseKbdand the MCP install button.Notes
main's comment workflow (0.1.7), so it has no prerendered URLs table yet; after merging, comments use0.2.0. bundle.nuxt.dev already runs ImproveAppPageBottomcomponent to fetch thedirfrom @nuxt/content #27, so its comparison for this pull request shows the prerendered URLs in Pages.ELI5
The size check used to guess what a docs page loads by following the code, and it missed the parts a page loads because of what's written in it. Now it builds five real pages, picked so that together they use the docs' heavier building blocks such as images and code trees, and reads which files their HTML asks for. The numbers match what a visitor's browser fetches.
🤖 Generated with Amp, reviewed by @larbish before opening.