[go: nahoru, domu]

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

perf: reduce bundle size #219

Closed
wants to merge 1 commit into from
Closed

Conversation

SukkaW
Copy link
Contributor
@SukkaW SukkaW commented Feb 24, 2022

Changes to reduce the final bundle size:

  • Extract the constants (e.g. ['-webkit-', '-moz-', '']).
  • Prefer Array#indexOf over Object#hasOwnProperty when possible.
  • Prefer ternary expressions

@robinweser
Copy link
Owner

Did you ever measure the difference here? Seems like a lot of premature optimisations to me that eventually will not have a big impact once compressed. Just my initial thought though - Happy to be proven wrong and happy to merge it in that case!

@SukkaW
Copy link
Contributor Author
SukkaW commented Aug 31, 2022

Did you ever measure the difference here? Seems like a lot of premature optimisations to me that eventually will not have a big impact once compressed. Just my initial thought though - Happy to be proven wrong and happy to merge it in that case!

@robinweser Sure! Let me test it with https://github.com/ai/size-limit

@SukkaW SukkaW closed this Jul 30, 2023
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