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

Performance: Module is unreasonable huge #288

Open
OZZlE opened this issue Oct 22, 2019 · 2 comments
Open

Performance: Module is unreasonable huge #288

OZZlE opened this issue Oct 22, 2019 · 2 comments

Comments

@OZZlE
Copy link

OZZlE commented Oct 22, 2019

It's 400 KB minified+gzipped though.. It seems like around half is babel stuff that will probably be used anyway and brough up as a top level requirement by node but 200 KB is still a lot!!

https://bundlephobia.com/[email protected]
Skärmklipp 2019-10-21 11 57 59

@OZZlE OZZlE changed the title Performance Module is unreasonable huge Performance: Module is unreasonable huge Oct 22, 2019
@OZZlE
Copy link
Author

OZZlE commented Oct 22, 2019

All svg files you use might not be 200 KB combined :P

@OZZlE
Copy link
Author

OZZlE commented Oct 22, 2019

Tip to others before using this. If you convert inline styles to React/jsx inline styles and avoid or move <style> styling to separate css files then you could use this approach instead https://css-tricks.com/creating-svg-icon-system-react/

you might want to make it possible to send in inline style to these components also though. I guess you could make a parent component that you extend from instead of React.Component but that has many downsides also.. Not sure how you could keep the code DRY in any other way though..

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

No branches or pull requests

1 participant