阮一峰的ES6教程里有讲:

import 命令加载 CommonJS 模块 Node 采用 CommonJS 模块格式,模块的输出都定义在module.exports这个属性上面。在 Node 环境中,使用import命令加载 CommonJS 模块,Node 会自动将module.exports属性,当作模块的默认输出,即等同于export default。

相关文章:

  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-03-10
  • 2021-09-13
  • 2022-12-23
  • 2021-06-16
  • 2021-05-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2022-01-21
  • 2021-07-27
  • 2021-10-14
相关资源
相似解决方案