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

Expect to reduce the production bundle size when this package is included #58

Open
samarpanda opened this issue Jan 14, 2021 · 1 comment

Comments

@samarpanda
Copy link

samarpanda commented Jan 14, 2021

EXPECTED BEHAVIOR

Pretty nice lib thanks for publishing. Recently included this in one of my project to create typography theme.
But noticed that this increased my production bundle size. Digging dipper found that lodash is one of the core dependency here. That might be causing this issue.

_What's the behavior you're expecting to see?

Expecting to add specific methods of lodash instead of including the complete package. So, the production bundle size can be reduced a lot.

ACTUAL BEHAVIOR

Scope of further reducing the production bundle size.

STEPS TO REPRODUCE

Include this in any of the project. Compare prior and after including styled-components-modifiers. You can easy find the bundle will be increased substantially.

SUGGESTED SOLUTION

Wondering if we need the complete lodash package. Haven't gone through the source code. But feels like we can use specific methods of lodash as needed. So, it can substantially reduce the build size.

@samarpanda
Copy link
Author

Wondering if that needs to be fixed on the build process. Anything you recommend while using this package?

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