Add tracking of frontend bundle size stats to CI#13078
Merged
lukasmasuch merged 2 commits intodevelopfrom Nov 21, 2025
Merged
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
✅ PR preview is ready!
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds automated tracking of frontend bundle size statistics to the CI pipeline. The implementation uses the vite-bundle-analyzer plugin to generate both JSON and HTML reports of the bundle composition during the build process.
- Adds
vite-bundle-analyzerdependency to analyze bundle composition - Configures bundle analysis to generate JSON and HTML output files
- Implements a new CI workflow job to build the frontend with analysis enabled and upload artifacts
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/app/package.json | Adds vite-bundle-analyzer@^1.2.3 as a dev dependency |
| frontend/yarn.lock | Lock file update for the new vite-bundle-analyzer package |
| frontend/app/vite.config.ts | Configures bundle analyzer plugin conditionally via ANALYZE_BUNDLE env var, generates JSON and HTML reports, enables sourcemaps when analyzing |
| .github/workflows/pr-preview.yml | Adds new analyze-frontend-bundle job that builds frontend with analysis enabled and uploads resulting artifacts |
Co-authored-by: Copilot <[email protected]>
sfc-gh-bnisco
approved these changes
Nov 21, 2025
Collaborator
sfc-gh-bnisco
left a comment
There was a problem hiding this comment.
Cool, thanks for this!
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.
Describe your changes
Adds an optional bundle analysis to our vite config. Runs the analysis and uploads the html and raw data to our CI artefacts. As a follow up task, we will also add a dashboard to https://issues.streamlit.app to track the changes in bundle size + PR comments to warn from significant changes similar to how its done with the wheel size.
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.