Starting version 13.2.0, Node.js has stable support of ES modules. In this post, you'll learn how to enable and use ES modules in Node.js. 1. Enabling ECMAScript modules in Node.js The default format of modules in Node.js is the CommonJS. But Node.js will treat a JavaScript file as an ECMAScript modules format if: The module's file extension is .mjs Or the module's nearest parent folder has { "typ

