This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
Add bundle size reporting to PRs #567
Labels
🤖 aspect: dx
Concerns developers' experience with the codebase
🌟 goal: addition
Addition of new feature
🟩 priority: low
Low priority and doesn't need to be rushed
Problem
Currently if we add or update a dependency, we don't have any automatic insight into how it effects our bundle sizes. Especially when adding a new dependency, this can be helpful in narrowing down options or debugging sudden unexpected increases in bundle sizes.
Description
Let's add a bundle size analysis step to the CI similar to how Gutenberg has it. Here is an example comment from a PR where this feedback was helpful for avoiding a sudden unexpected increase in bundle sizes.
We can copy the strategy used by Gutenberg in this workflow action.
The preactjs@compressed-size action should still work fine for us even though we're not using preact or React. It just does a Webpack bundle analysis to get the data.
If for whatever it doesn't work for us then we'll need to explore a bespoke strategy. I tried searching around for
nuxt
specific solutions but there don't appear to be any but we could build off ofnuxt build --analyze --spa --no-generate
and use the generated json stats output in the./.nuxt/stats
folder.Implementation
The text was updated successfully, but these errors were encountered: