How to Add Hooks to Node.js’ Require Function?
Published in
7 min readAug 30, 2022
Node.js is a JavaScript runtime environment based on the Chrome V8 engine. The early Node.js adopted the CommonJS module specification, and the ECMAScript Modules feature has been officially supported since Node v13.2.0. It was not until v15.3.0 that the ECMAScript Modules feature was stable and compatible with the NPM ecosystem.