Tagged articles
5 articles
Page 1 of 1
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.

BackendCJSNode.js
0 likes · 15 min read
Deep Dive into Node.js CJS Module Loading Process
Sohu Tech Products
Sohu Tech Products
Aug 25, 2021 · Backend Development

Understanding Node.js Module System and Implementing a Custom Require Loader

This article explains how Node.js implements module loading using the CommonJS wrapper, demonstrates the role of the built‑in vm module for isolated execution, and walks through building a custom Require function with path resolution, file reading, extension handling, caching, and automatic extension resolution.

CommonJSJavaScriptNode.js
0 likes · 14 min read
Understanding Node.js Module System and Implementing a Custom Require Loader
政采云技术
政采云技术
Dec 8, 2019 · Backend Development

Exploring the Source Code of the Node.js Module System

This article delves into Node.js’s module system, explaining the CommonJS specification, how Node implements module loading, resolution, caching, and execution, and provides detailed analysis of core source code including Module constructor, require, _load, _resolveFilename, and file extension handling.

CommonJSNode.jsmodule system
0 likes · 17 min read
Exploring the Source Code of the Node.js Module System
Node Underground
Node Underground
Jan 19, 2017 · Backend Development

Essential Node.js Best Practices Every Developer Should Follow

This article expands on earlier Node.js best practices by offering concrete, actionable guidelines such as modularizing code, managing require statements, handling errors, using npm shortcuts, respecting versioning, and properly separating development and production dependencies.

best practicesdependency managementnodejs
0 likes · 3 min read
Essential Node.js Best Practices Every Developer Should Follow