Node.js package configuration guide Getting started CommonJS and ESM Introduction to package.json Basics Single-file package configurations Single-file CommonJS package Single-file ESM package Multi-file package configurations CommonJS and ESM interoperability Shipping CommonJS for ESM Shipping ESM for CommonJS Migrating CommonJS to ESM Migrating imports Migrating exports Migrating context-local variables Migrating package.json Packages with a build step Bundling Bundling with Webpack Other bundlers Source maps Dual packages History of dual packages Dual package hazards Two full distributions CommonJS distribution, ESM wrapper Migrating dual packages to ESM-only Package configuration tools Q&A Troubleshooting