AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
The Difference Between Common.js and ECMAScript Modules in NBB
Node.js has its own module format for JavaScript files called Common.js. But since a few years, ECMAScript 6, there is a new format called ECMAScript modules. Some libraries in the ecosystem support only Common.js and some other types of modules. NBB uses what they call dynamic import behind the scenes to require libraries. And so this was kind of difficult to figure out.