Main point
The default mmntjs entry is not trying to win the smallest-core contest.
Package Size
Measure raw, minified, compressed, bundled, and runtime costs separately. `mmntjs` default is compatibility-heavy, so the raw core is not the main selling point. The more important property is that locale data and timezone data are kept separate, which gives tree-shaking and entry-point choice real leverage.
What To Understand
The default mmntjs entry is not trying to win the smallest-core contest.
Locales and timezone data are separate, so apps do not pay for them unless they import them.
mmntjs/lite exists for browser-sensitive paths that want a smaller base and explicit add-backs.
The packaged IANA timezone data is smaller than many readers expect once compressed and packed.
Entry Sizes
| Entry | Raw size | Compare against | Reading | Why it matters |
|---|---|---|---|---|
mmntjs | 148 KB | moment (62.1 KB raw) | core is smaller on the moment side | Default compatibility-oriented core. |
mmntjs/lite | 43 KB | moment (62.1 KB raw) | smaller base than moment and default mmntjs | Browser-sensitive base entry with explicit add-backs. |
dist/locale/ja.js | 4.8 KB | moment + locale/ja (64.5 KB raw bundled) | single locale stays separate | Single locale remains a tiny extra module instead of pushing toward all-locales builds. |
mmntjs-timezone | 316 KB raw dist | moment-timezone (773.1 KB raw bundled) | compare as separate package | Timezone data stays outside core and should be judged on its own. |
Why This Helps
How To Read It
mmntjs when you want the broadest moment-compatible surface and can accept a heavier core.mmntjs/lite when browser size matters and you are willing to add parsing, locale, or other extras explicitly.Timezone Data
packages/timezone/dist/index.js is about 316 KB raw and about 38.1 KB gzip after the pack-format migration.Methodology
The interesting part is not only how the numbers were measured, but how the timezone package was made smaller in the first place.
Replace long zone names like America/New_York with short base-60 IDs, then materialize them at runtime.
Compress DST transition index patterns using run forms such as pair-repeat and increment. This is the most 'modern math' part of the timezone size work.
Turn repeated timezone deltas into global dictionary IDs so frequent transition values collapse to short tokens.