Commit ca9620e
committed
Use empty messages in init.ts to avoid dependency on compiled catalogs
Pre-initialization only needs to activate a locale, not load real messages.
App.tsx loads the real English catalog via i18n.loadAndActivate() in useEffect,
and since module-level t calls execute lazily from builder functions (called
in useMemo), they'll use the real messages.
This eliminates the hard dependency on compiled messages.mjs, allowing dev
workflows (pnpm dev, tests, fresh clones) to work without requiring
locale:compile to run first.
Bundle size: init.js reduced from 5.26 kB to 0.77 kB.1 parent 09dfe78 commit ca9620e
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
16 | | - | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
19 | 21 | | |
0 commit comments