Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update changeset
Browse files Browse the repository at this point in the history
LekoArts authored Nov 30, 2023
1 parent 5e8714c commit 0e7d876
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .changeset/selfish-trains-breathe.md
Original file line number Diff line number Diff line change
@@ -2,13 +2,19 @@
'@clerk/localizations': patch
---

The package now allows for [subpath exports](https://nodejs.org/api/packages.html#subpath-exports).
The package now allows for [subpath exports](https://nodejs.org/api/packages.html#subpath-exports). You can now import specific languages like so:

```diff
# Single language
- import { frFR } from "@clerk/localizations"
+ import { frFR } from "@clerk/localizations/fr-FR"

# Multiple languages
- import { enUS, esES } from "@clerk/localizations"
+ import { enUS } from "@clerk/localizations/en-US"
+ import { esES } from "@clerk/localizations/es-ES"
```

This should help with tree-shaking by helping the bundler to include only specific localization.
This helps with tree-shaking and will reduce your total bundle size in most cases.

This is a non-breaking change-previous imports from "@clerk/localizations" are still working as expected.
You can continue to use the top-level `@clerk/localizations` import as this is a non-breaking change. You can gradually opt-in to this optimization.

0 comments on commit 0e7d876

Please sign in to comment.