Skip to content

ci: Try adding compressed-size-action for build stats#1328

Merged
rschristian merged 8 commits intomasterfrom
ci/size-stats
Sep 30, 2025
Merged

ci: Try adding compressed-size-action for build stats#1328
rschristian merged 8 commits intomasterfrom
ci/size-stats

Conversation

@rschristian
Copy link
Member

@rschristian rschristian commented Aug 26, 2025

Might be useful for easier eyeballing of some PRs

@github-actions
Copy link

github-actions bot commented Aug 26, 2025

Size Change: -10.9 kB (-2.37%)

Total Size: 449 kB

Filename Size Change
build/assets/esm-********.js 0 B -27.9 kB (removed) 🏆
build/assets/index-********.js 33.1 kB +614 B (+1.89%)
build/assets/index-********.css 9.85 kB -336 B (-3.3%)
build/assets/lib-********.js 0 B -28.9 kB (removed) 🏆
build/assets/repl-********.js 148 kB +2.78 kB (+1.92%)
build/assets/repl.worker-********.js 213 kB +14.2 kB (+7.16%) 🔍
build/assets/rolldown-runtime-********.js 0 B -399 B (removed) 🏆
build/assets/docsearch-********.js 28.9 kB +28.9 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
build/assets/blog-page-********.js 257 B +5 B (+1.98%)
build/assets/errors-********.js 342 B +9 B (+2.7%)
build/assets/repl-********.css 1.51 kB +35 B (+2.37%)
build/assets/repl-page-********.js 7.65 kB +15 B (+0.2%)
build/assets/style-********.css 3.07 kB 0 B
build/assets/style.module-********.js 159 B -31 B (-16.32%) 👏
build/assets/tutorial-page-********.css 1.76 kB +14 B (+0.8%)
build/assets/tutorial-page-********.js 1.99 kB +75 B (+3.91%)

compressed-size-action

@rschristian rschristian force-pushed the ci/size-stats branch 2 times, most recently from ae2cf88 to b8f742f Compare September 30, 2025 02:12
"rollup": "^2.79.1",
"sucrase": "^3.35.0",
"vite": "npm:rolldown-vite@^7.1.4",
"vite": "^7.1.7",
Copy link
Member Author

@rschristian rschristian Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rolldown-vite has some known issues when used alongside manualChunks, which is an issue as we make use of this during prerendering. Those that I know of:

  • Sourcemaps are always null for our prerender entry, meaning you get no nice error messages if something does go wrong
  • The prerender entry looks like this instead of being merged into the actual bundle entry:
    • import{b as e}from"./index-BKvQVBdq.js";export{e as prerender};
    • This is an issue w/ this PR especially as we have two index files: the real app entry and this silly re-export. As you can see above in the comparison, compressed-size is comparing the real app entry with the silly re-export, creating such a huge diff. It won't try to intelligently compare the modules. As one of these isn't even meant to exist at all, we can't really fix this either.

Given that the speed up is negligible anyhow, switching back seems reasonable.

Comment on lines -23 to -24
- run: npm ci
- run: npm run build
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentionally removed as we were basically just checking that it could build/wouldn't error out on malformed markdown or the like which compressed-size will also do.

Comment on lines -1 to -2
size-files:
- size-plugin.json
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK this is unused? I think it comes from back when we were using preact-cli? Not quite sure tbh.

@rschristian rschristian marked this pull request as ready for review September 30, 2025 03:25
@rschristian rschristian merged commit 23da10d into master Sep 30, 2025
5 checks passed
@rschristian rschristian deleted the ci/size-stats branch September 30, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants