Menghuan1918
c7d58c9b25
perf: move the 19 non-zh/en dictionaries into a lazy locale chunk
...
The core client bundle statically imported every third-language
dictionary (ja/de/fr/…/zh-HK/MO/TW, ~640KB of source — roughly half
the bundle's weight) for a code path most sessions never enter: the
sidebar's own t() only consults zh/en plus the better-locale override
store, and the dicts' ONLY consumer is that store's register() call.
They now ride the existing lazy-chunk machinery as lib/client-locale.js
(fetched from /sidebar/bundle only when better-locale is actually
installed; a generation counter keeps the async registration moot when
the integration effect re-runs or disposes mid-flight). Until the chunk
lands, t() keeps the zh/en chain; the store's own revision bump on
register re-renders the chrome once the dicts arrive.
Core client.js: 1.46MB → 822KB (-44%). The chunk-boundary key-set
check moves to the existing runtime test (every shipped dict stays
key-set-equal to zh).
2026-09-01 16:01:34 +08:00
..
2026-09-01 15:58:44 +08:00
2026-08-18 20:29:14 +08:00
2026-08-16 22:32:17 +08:00
2026-08-27 21:44:04 +08:00
2026-08-10 21:43:58 +08:00
2026-08-26 18:33:52 +08:00
2026-08-15 00:28:59 +08:00
2026-08-24 16:41:02 +08:00
2026-08-21 23:49:13 +08:00
2026-08-12 18:27:28 +08:00
2026-08-20 02:09:36 +08:00
2026-08-11 19:28:48 +08:00
2026-08-11 19:28:48 +08:00
2026-08-31 17:52:59 +08:00
2026-09-01 16:01:34 +08:00
2026-08-31 01:31:22 +08:00
2026-08-31 17:52:59 +08:00
2026-08-18 01:22:28 +08:00
2026-08-30 23:42:16 +08:00
2026-08-14 21:28:41 +08:00
2026-08-21 01:28:17 +08:00
2026-08-31 01:31:22 +08:00
2026-08-31 01:31:22 +08:00
2026-09-01 15:02:28 +08:00
2026-08-24 18:40:04 +08:00
2026-08-11 11:16:36 +08:00
2026-08-24 18:40:04 +08:00
2026-08-29 15:49:19 +08:00
2026-08-29 15:49:19 +08:00
2026-08-29 15:49:19 +08:00
2026-08-18 18:05:01 +08:00
2026-08-22 22:50:13 +08:00
2026-08-24 17:54:33 +08:00
2026-08-23 10:28:05 +08:00
2026-08-23 02:50:37 +08:00
2026-08-16 23:35:57 +08:00
2026-08-16 23:35:57 +08:00
2026-08-22 23:11:27 +08:00
2026-08-31 01:31:22 +08:00
2026-08-24 14:18:18 +08:00
2026-08-31 01:31:22 +08:00
2026-08-16 23:35:57 +08:00
2026-08-12 01:16:20 +08:00
2026-08-24 17:54:33 +08:00
2026-08-13 09:06:55 +08:00
2026-08-21 23:41:33 +08:00
2026-08-21 23:41:33 +08:00
2026-08-14 22:30:34 +08:00
2026-08-15 15:05:06 +08:00
2026-09-01 16:01:34 +08:00
2026-08-30 23:42:16 +08:00
2026-08-13 10:26:57 +08:00
2026-08-24 12:05:14 +08:00
2026-08-24 12:05:14 +08:00
2026-08-23 22:02:47 +08:00
2026-08-24 18:40:04 +08:00
2026-08-30 23:42:16 +08:00
2026-08-24 12:05:14 +08:00
2026-08-18 01:22:28 +08:00
2026-08-23 01:50:07 +08:00
2026-08-18 01:22:28 +08:00
2026-08-22 23:19:17 +08:00
2026-08-14 14:53:03 +08:00
2026-08-22 23:19:17 +08:00
2026-08-22 23:19:17 +08:00
2026-08-24 01:39:53 +08:00
2026-08-11 11:22:28 +08:00
2026-08-16 23:35:57 +08:00
2026-08-26 21:40:32 +08:00
2026-08-16 23:35:57 +08:00
2026-08-14 23:04:25 +08:00
2026-08-31 17:52:59 +08:00
2026-09-01 15:58:44 +08:00
2026-08-16 23:06:44 +08:00
2026-08-21 00:48:16 +08:00
2026-08-18 19:56:04 +08:00
2026-08-24 18:40:04 +08:00
2026-08-13 01:39:59 +08:00
2026-08-23 23:44:18 +08:00
2026-08-16 16:24:28 +08:00
2026-08-21 01:28:17 +08:00
2026-08-20 02:09:36 +08:00
2026-08-24 01:19:43 +08:00
2026-08-24 16:41:02 +08:00
2026-08-22 00:15:06 +08:00
2026-08-22 15:34:05 +08:00
2026-08-30 22:38:09 +08:00
2026-08-21 15:41:14 +08:00
2026-09-01 16:01:34 +08:00
2026-08-31 23:28:20 +08:00
2026-08-31 17:52:59 +08:00
2026-08-26 18:27:32 +08:00
2026-08-21 18:15:49 +08:00
2026-08-22 15:34:05 +08:00
2026-08-21 18:15:49 +08:00
2026-08-13 09:06:55 +08:00
2026-08-21 18:15:49 +08:00
2026-08-21 18:15:49 +08:00
2026-08-26 18:42:34 +08:00
2026-08-23 23:44:18 +08:00
2026-08-23 23:44:18 +08:00
2026-08-26 21:40:32 +08:00
2026-08-17 00:06:20 +08:00
2026-08-24 18:40:04 +08:00
2026-08-27 21:44:32 +08:00
2026-08-16 16:37:11 +08:00
2026-08-21 01:28:17 +08:00
2026-08-27 21:44:04 +08:00
2026-08-18 23:23:17 +08:00
2026-08-24 01:36:29 +08:00
2026-08-20 18:28:57 +08:00
2026-08-21 01:28:17 +08:00