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

Optimizing bundle size #4710

Open
1 task done
SavoInfostream opened this issue Aug 30, 2024 · 1 comment
Open
1 task done

Optimizing bundle size #4710

SavoInfostream opened this issue Aug 30, 2024 · 1 comment
Labels
needs jira ticket triage An issue needing triage

Comments

@SavoInfostream
Copy link

Code of conduct

  • I agree to follow this project's code of conduct.

Description of issue

Is there anything I need to be doing in order to decrease my bundle size? Half of my app size seems to be from Spectrum.
I am not importing from bundle, but directly from specific packages. I am using light and medium packages for theme, I am importing only components that are needed, etc...

Here are some of the results of the esbuild analyzer
theme (theme.css.js + scale-medium.css.js + theme-light.css.js) = 288.8 kB
button = 54.4 kB
slider = 49.2 kB

Is there any way for this size to be brought down?

@SavoInfostream SavoInfostream added needs jira ticket triage An issue needing triage labels Aug 30, 2024
@SavoInfostream
Copy link
Author

SavoInfostream commented Sep 2, 2024

I wrote a node script for processing output chunks which has removed unused css custom properties, rewrote rules which referenced undeclared variables, and minimized variable names. This had dropped more than 0.5MB from final size.

It is a bit better now, but still not great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs jira ticket triage An issue needing triage
Projects
None yet
Development

No branches or pull requests

1 participant