标签: 源码解读

阮一峰:require() 源码解读

阮一峰:require() 源码解读

CommonJS 格式。

时至今日,Node.js 的模块仓库 npmjs.com ,已经存放了15万个模块,其中绝大部分都是 CommonJS 格式