Open hhking opened 6 years ago
https://blog.hhking.cn/2018/08/23/exports-vs-moduleexports/
前言Node.js 模块系统是采用 CommonJS 模块规范的。每个文件视为一个独立的模块。使用 require 导入模块,使用 module.exports 和 exports 导出模块。那么 module.exports 和 exports 的区别在哪里呢?
https://blog.hhking.cn/2018/08/23/exports-vs-moduleexports/
前言Node.js 模块系统是采用 CommonJS 模块规范的。每个文件视为一个独立的模块。使用 require 导入模块,使用 module.exports 和 exports 导出模块。那么 module.exports 和 exports 的区别在哪里呢?