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: Enable tree-shaking #108

Merged
merged 22 commits into from
May 10, 2022
Merged

fix: Enable tree-shaking #108

merged 22 commits into from
May 10, 2022

Conversation

amannn
Copy link
Owner

@amannn amannn commented Apr 28, 2022

https://www.npmjs.com/package/@formatjs/icu-messageformat-parser grew in size – that's the culprit.

Possibly we could provide a modern build as well like microbundle advertises it … However since the parser makes up the majority of the bundle size, the result might be negligible.

Could https://www.npmjs.com/package/@messageformat/parser be an alternative? Or just wait for native Intl.MessageFormat.

Fixes #107

@amannn amannn self-assigned this Apr 28, 2022
@vercel
Copy link

vercel bot commented Apr 28, 2022

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

Name Status Preview Updated
next-intl ✅ Ready (Inspect) Visit Preview May 10, 2022 at 8:59AM (UTC)

@amannn amannn changed the title fix: ESM build for browser fix: Fix bundle size Apr 28, 2022
@amannn amannn changed the title fix: Fix bundle size fix: Reduce bundle size Apr 28, 2022
# Conflicts:
#	lerna.json
#	packages/example-advanced/package.json
#	packages/example/package.json
#	packages/next-intl/package.json
#	packages/use-intl/package.json
#	packages/use-intl/src/validateMessages.tsx
@amannn amannn changed the title fix: Reduce bundle size fix: Add tree-shaking support May 10, 2022
@amannn amannn marked this pull request as ready for review May 10, 2022 09:02
@amannn amannn changed the title fix: Add tree-shaking support fix: Enable tree-shaking May 10, 2022
@amannn amannn merged commit 157b0e2 into main May 10, 2022
@amannn amannn deleted the fix/107-bundle-size branch May 10, 2022 09:07
juanforlizzi pushed a commit to juanforlizzi/next-intl that referenced this pull request Jan 16, 2025
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.

Investigate bundle size increase in 2.7.0
1 participant