What is the difference between .js and .mjs files?
It indicates an ES6 module file. Node.js’s original module system is CommonJs (which uses require and module.exports). Since Node.js was created, the ECMAScript module system (which uses import and export) has become standard and Node.js has added support for it. Node.js will treat .cjs files as CommonJS modules and .mjs files as ECMAScript modules. It … Read more