Skip to content

feat: bundle-stats plugin poc implementation #1024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Jul 7, 2025

Bundle Stats Plugin PoC Implementation

Fine-grained bundle size tracking for your builds
This plugin enables advanced bundle stats capabilities to avoiding unwanted size increase.


📝 Related Issue

👉 #1015 – Bundle Stats Plugin Architecture Discussion

NOTE:
This PoC PR serves as an initial implementation to validate the proposed architecture and core functionality.
The final implementation will be delivered in smaller, focused PRs to ensure clarity, better reviewability, and incremental improvements.

The final implementation is delivered in the following PR's:

  • utils
  • runner
    • unify logic
    • rest of processing logic
  • plugin
  • docs
  • e2e

🔌 Plugin Overview


Report Eaxmples


Code PushUp Report

🏷 Category ⭐ Score 🛡 Audits
Bundle Size 🟡 54 13

🏷 Categories

Performance

Bundle size metrics 📖 Docs

🟢 Score: 92

🛡️ Audits

Bundle size changes InitialChunks (CodePushUp)

🟥 3 info (score: 0)

Initial Chunks

🗂️ initial-bundles                               237.16 kB  101 files
├── 📍 main-XTHQ3HCO.js                            98.01 kB   14 files
│   ├── src/app/app.routes.ts                         101 B     1 file
│   ├── src/app/app.config.ts                          53 B     1 file
│   ├── src/app/app.component.ts                   17.59 kB     1 file
│   ├── src/main.ts                                    37 B     1 file
│   ├── 🅰️ @angular/common                         5.46 kB    4 files
│   ├── 🅰️ @angular/platform-browser              11.47 kB    3 files
│   └── 🅰️ @angular/router                        63.31 kB    3 files
├── 📍 polyfills-B6TNHZQ6.js                       33.77 kB    2 files
│   ├── angular:polyfills:angular:polyfills                     1 file
│   └── 📦 zone.js                                 33.77 kB     1 file
├── 📄 styles-EGIV7BA7.css                            631 B     1 file
└── 🔗 static imports from 📍 main-XTHQ3HCO.js    104.76 kB   84 files
    └── 📄 chunk-5QRGP6BJ.js

Issues

Severity Message Source file Line(s)
⚠️ warning Bundle size (236.51 kB) is below minimum threshold (300 kB)

CI Comment

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Bundle size Total 🟨 12.0 MB 🟥 13.1 MB ↑ +9.2 %
Bundle size Initial Chunks 🟩 6.0 MB 🟩 6.2 MB ↑ +3.3 %
Bundle size Lazy Chunks 🟥 6.0 MB 🟥 6.9 MB ↑ +15.0 %
Bundle size Main Bundle 🟨 5.0 MB 🟥 5.2 MB ↑ +4.0 %
Bundle size Auth Module 🟨 1.1 MB 🟥 1.3 MB ↑ +18.2 %
Bundle size Lazy Products 🟩 3.0 MB 🟩 3.1 MB ↑ +3.3 %

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling labels Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant