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

Don't load ICU formatting into bundle #1795

Closed
max-frai opened this issue Mar 17, 2025 · 2 comments
Closed

Don't load ICU formatting into bundle #1795

max-frai opened this issue Mar 17, 2025 · 2 comments
Labels
enhancement New feature or request unconfirmed Needs triage.

Comments

@max-frai
Copy link

Is your feature request related to a problem? Please describe.

Hello, I'm optimizing my website and found with bundle analyzer, that big portion of js takes formatjs/intl-messageformat. I don't use message formatting in the project and there is no importing of this in the code. Is it possible to remove it from bundle?

Image

Describe the solution you'd like

If we don't use message formatting, removing it from bundle would be great

Describe alternatives you've considered

@max-frai max-frai added enhancement New feature or request unconfirmed Needs triage. labels Mar 17, 2025
@amannn
Copy link
Owner

amannn commented Mar 17, 2025

This is tracked in #962.

Along with #1 these are the main features I have planned for the coming future of next-intl to make sure performance is as good as it gets.

@amannn amannn closed this as completed Mar 17, 2025
@amannn
Copy link
Owner

amannn commented Mar 17, 2025

As a side note, if you don't use any ICU features at all, I know that one user once set up an alias to the import of "intl-messageformat", to import it as null. It's a hack that can work for some limited cases.

AOT-compilation will be the thorough solution though that will work for all cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants