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

Give users the option to load a subset of encodings to minimize js bundle size #291

Open
eekboom opened this issue Jan 6, 2022 · 1 comment
Labels

Comments

@eekboom
Copy link

eekboom commented Jan 6, 2022

After adding iconv-lite to my small preact app, the minified js bundly grew by about 300KB.

Is there a way to selectively bundle a few encodings (utf-8, iso-8859-*) and fetch the others when needed?
I guess there isn't because the API to encode/decode is synchronous.

In that case it would be a very welcome feature.

@ashtuchkin
Copy link
Owner

That's correct. I guess a good way to do that would be to split encodings into different npm modules and give users the option to only depend on the one they need. I'll take that into account when planning new version.

Thank you!

@ashtuchkin ashtuchkin changed the title [Question] Is there a way to load encodings on demand? Give users the option to load a subset of encodings to minimize js bundle size Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants