chenshuhong / fullstack

我的全栈路线思维导图以及日常知识记录
MIT License
0 stars 0 forks source link

JavaScript之模块加载方案 #18

Open chenshuhong opened 4 years ago

chenshuhong commented 4 years ago

参考文章

chenshuhong commented 4 years ago

ES6 与 CommonJS

  1. CommonJS 模块输出的是一个值的拷贝,ES6 模块输出的是值的引用。
  2. CommonJS 模块是运行时加载,ES6 模块是编译时输出接口。