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(perf): prevent unnecessary bundling of caniuse-lite #43394

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Feb 6, 2024

Summary

It does not support tree shaking as they are still building a cjs bundle. However, they bundle certain futures to separate smaller modules which we can take advantage of.

Saves us around 930 KB (prod bundle).

grafik

Checklist

@st3iny st3iny added 3. to review Waiting for reviews performance 🚀 labels Feb 6, 2024
@st3iny st3iny requested review from susnux, skjnldsv, ShGKme and a team February 6, 2024 13:59
@st3iny st3iny self-assigned this Feb 6, 2024
@st3iny st3iny requested review from Fenn-CS and removed request for a team February 6, 2024 13:59
@st3iny st3iny added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 6, 2024
Copy link
Member

@joshtrichards joshtrichards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any downsides/trade-offs you can think of? Is this basically just including only what we need now and less of what we never used anyway?

@st3iny
Copy link
Member Author

st3iny commented Feb 6, 2024

Any downsides/trade-offs you can think of? Is this basically just including only what we need now and less of what we never used anyway?

The code that I removed from the bundle is not used at all so it's just an optimization.

It does not support tree shaking as they are still building a cjs
bundle. However, they bundle certain futures to separate smaller modules
which we can take advantage of.

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny st3iny merged commit 80c832e into master Feb 7, 2024
85 checks passed
@st3iny st3iny deleted the chore/perf/caniuse-lite branch February 7, 2024 12:05
@blizzz blizzz mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish performance 🚀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants