Skip to main content

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 recipe package-json normalize-modules [options]

Options

FlagDescription
-d, --dry-runPreview changes without modifying files.
-r, --replace-fileOverwrite the original file instead of creating a backup.