Skip to main content
Dublin Library

The Publishing Project

Tagged “Modules”

--- desc: ---
Revisiting Modules in Node.js

Working with modules in Node.js has evolved significantly. It used to be simple: CommonJS was the only game in town. With the introduction of ES Modules (ESM) and their stabilization in Node.js,...

Top-level Await in Modules

Top-level await in Javascript allows developers to use the await keyword at the top level of a module, outside of an async function. This simplifies code by enabling modules to act as if they are...

Converting CommonJS to ES Modules

Node.js has always supported Common.js as the module system. When building a package we use modules.export to define the elements in the package that can be consumed by other modules: // file:...

Using Module Exports to Organize Your Code

Most of the time I work with ES Modules as a consumer, only using the import side of the equation. However there is another side to modules when working in creating reusable code libraries. This post...

Import Maps Are Ready For Use

Import maps allow developers to instead specify arbitrary text in the module specifier when importing a module; the map provides a corresponding value that will replace the text when the module URL is...

Link to Archive

See all tags.