Normalize Modules
Normalize exports, main, type, browser, and imports fields in workspace package.json files.
Summary
The normalize-modules recipe ensures that module resolution fields in each workspace's package.json follow the official Node.js module specification conventions. It handles exports map structure, main entry point, module type declaration, browser field, and import maps.
Usage
- nova (installed)
- npx (no install)
nova recipe package-json normalize-modules [options]
npx --yes @cbnventures/nova@latest recipe package-json normalize-modules [options]
Options
| Flag | Description |
|---|---|
-d, --dry-run | Preview changes without modifying files. |
-r, --replace-file | Overwrite the original file instead of creating a backup. |