摘要: nodejs端实现模块化的方式通常是通过commonjs,使用模块化可以复用js代码,使得逻辑结构更为清晰。 commonjs的语法规则如下通过 module.exports 或者 exports 导出,通过 require函数来导入 // a.js 导出内容 const name = 'alice 阅读全文
posted @ 2021-06-14 22:03 一颗冰淇淋 阅读(600) 评论(0) 推荐(0) 编辑