Tag

CJS

0 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Mar 29, 2023 · Backend Development

Comprehensive Guide to Packaging JavaScript Libraries: ESM, CJS, UMD and Best Practices

This guide provides clear, practical recommendations for packaging JavaScript libraries—including outputting ESM, CJS and UMD formats, handling multi‑file builds, code compression, sourcemaps, TypeScript typings, external frameworks, modern browser support, and essential package.json fields—so developers can create robust, tree‑shakable, and well‑documented npm packages.

BundlersCJSESM
0 likes · 20 min read
Comprehensive Guide to Packaging JavaScript Libraries: ESM, CJS, UMD and Best Practices
DaTaobao Tech
DaTaobao Tech
Sep 26, 2022 · Backend Development

Deep Dive into Node.js CJS Module Loading Process

The article dissects Node.js v17’s source to reveal how the CommonJS `require` system is bootstrapped, how native modules are loaded, how `Module._load` resolves, caches, and executes user files, and how the overall CJS loading pipeline operates step‑by‑step.

CJSNode.jsRequire
0 likes · 15 min read
Deep Dive into Node.js CJS Module Loading Process