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

Bundle Size #174

Open
mohan2910 opened this issue Mar 2, 2024 · 1 comment
Open

Bundle Size #174

mohan2910 opened this issue Mar 2, 2024 · 1 comment

Comments

@mohan2910
Copy link

mohan2910 commented Mar 2, 2024

I have used the country-state-city npm package in ReactJS to make the country, state, and city dropdowns. But the bundle size is nearly 8.8 MB. How do I reduce the bundle size?

@Srijan67
Copy link

Srijan67 commented May 3, 2024

The size of the package is actually on a very heavy end. I also faced the same issue. They really need to fix this.
@mohan2910
As a workaround what you can do is if you are using react, make sure to load this in background so that when you come to this page it already gets cached. Obviously for that you need to implement lazy loading on the page where you are implementing the 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

2 participants