Short comparison of the most common statements in CommonJS vs. ESM/ECMAScript for importing, exporting and in your package.json.
CommonJS
Convert an existing NodeJS project from CommonJS to ESM / ECMAScript
A quick guide for converting your existing NodeJS projects from CommonJS to ESM/ECMAScript. Including Express, Jest, Supertest and ESLint.
Use CommonJS npm packages in the browser with Browserify
A convenient way to use CommonJS npm packages in client-side JavaScript using Browserify.