From 0e7d876c2602b6e53635af26a301c81edaf5bc9d Mon Sep 17 00:00:00 2001 From: Lennart Date: Thu, 30 Nov 2023 09:53:38 +0100 Subject: [PATCH] update changeset --- .changeset/selfish-trains-breathe.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.changeset/selfish-trains-breathe.md b/.changeset/selfish-trains-breathe.md index 055d37fb4f..549eb5f9c5 100644 --- a/.changeset/selfish-trains-breathe.md +++ b/.changeset/selfish-trains-breathe.md @@ -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. \ No newline at end of file +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.