module.exports和exports的区别
摘要:
在学习Node.js时,经常能看到两种导出模块的方式:module.exports和exports 在文件a.js中用exports或module.exports导出的对象(方法、变量),可以在另一个文件b.js中通过require('./a')引用 module和exports是Node.js给每 阅读全文
posted @ 2022-03-31 18:10 布灵的大乔 阅读(86) 评论(0) 推荐(0) 编辑