Docs
Browser Usage
Document browser loading shapes and what teams should verify in client bundles.
Guidance
Browser Evaluation Needs Bundle Awareness
Client-side adoption is affected by entry points, locale loading, and bundle shape as much as API compatibility. Teams should check what actually ships, not just what works in isolated examples.
The current source docs distinguish bundled measurements from raw dist output. That matters because browser teams usually care about bundler output first, while release engineering may care about shipped dist artifacts.
- Default mmntjs entry is about 39 KB gzip bundled and about 54 KB gzip as dist output.
- Lite is about 12 KB gzip bundled and can add plugins or locales incrementally.
- Timezone support is a separate package rather than silently bundled into core.
Examples
Lite entry with explicit add-ons
import moment from "mmntjs/lite";
import "mmntjs/plugin/format-parse";
import "mmntjs/locale/ja";This matches the README guidance for smaller browser bundles that only add back the features you actually need.
Script-tag usage
<script src="https://cdn.jsdelivr.net/npm/mmntjs/dist/mmntjs.min.js"></script>
<script>
mmntjs().format("LLLL");
</script>The browser docs should make it clear that CDN script-tag consumption remains available alongside ESM imports.
How To Use This Doc
Use this page as a migration review aid rather than as a generic tutorial. If the behavior in this area is business-critical, compare it directly against your current moment.js usage and record the outcome before expanding rollout.