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

fix: Lazy init message formatter for improved tree shaking in case useTranslations is only used in Server Components #1279

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

amannn
Copy link
Owner

@amannn amannn commented Aug 22, 2024

Fixes a regression of #1193.

In case you're only using useTranslations in Server Components, this will no longer bundle intl-messageformat on the client side (even if you're using other functionality like useFormatter there).

…seTranslations` is only used in Server Components
Copy link

vercel bot commented Aug 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 3:10pm
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 3:10pm
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 3:10pm

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

Successfully merging this pull request may close these issues.

1 participant