Skip to content
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

chore: add check for package size regression #482

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

Conversation

williazz
Copy link
Contributor

Analyzes the package size diff of every pull request, broken down by file. For example, williazz#1 (comment). Moving forward, this will help us keep aws-rum-web as small as possible.

The GitHub Action depends on third party package https://github.com/pkg-size/action


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@williazz
Copy link
Contributor Author

Issue: I think the default permissions for GITHUB_TOKEN are limited at the AWS level. Have to change when we have the chance

@qhanam
Copy link
Member

qhanam commented Jan 10, 2024

I like the idea behind this. That is, to gives us visibility into the size of the bundles we are releasing. This will be particularly helpful if and when we create multiple builds (e.g., without sigv4 or web vitals attribution).

However, I think this tool solves the wrong problem. This tool shows us the package size, when we are interested in the size of the bundle (i.e., the file "cwr.js"). The package doesn't account for things like dependencies (which are the bulk of the bundle size), minimization, or compression.

For example, I think we want something like the following table:

File Size Compressed Size
cwr.js 218KB 54KB
cwr_min.js 50KB 10KB

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.

None yet

2 participants