Docs
Installation
Install mmntjs as a standalone package or as a moment-compatible replacement.
Guidance
Prefer Installation Shapes That Match Your Evaluation Strategy
Some teams want the lowest-friction alias path first. Others prefer explicit imports so the changed surface is obvious in code review. Both are valid, but the right choice depends on how you plan to control rollout risk.
- Alias-based install for low-friction trials.
- Direct package import for module-by-module migration.
- Keep runtime and bundling expectations visible from the start.
Examples
Direct package install
npm install mmntjsBest when you want code review to show each migration step explicitly.
Migration tool rewrite
npm install mmntjs
mmntjs migrate --apply path/to/moduleBest when you want the tool to rewrite one owned surface while keeping the rollout reviewable.
Import replacement
import moment from "mmntjs";
moment("2024-01-01").format("YYYY-MM-DD");Alias-based replacement
npm install moment@npm:mmntjsBest for low-friction evaluation when you need unchanged import sites first.
Lite entry with add-ons
import moment from "mmntjs/lite";
import "mmntjs/plugin/format-parse";
import "mmntjs/locale/ja";Useful when browser bundle cost matters and the narrower feature surface is acceptable.
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.