Node_ESModule

120 阅读1分钟

1. ES Module使用方法:

一种是在引入处,添加type="module",另一种是在package.json中添加{"type": "module"},最后一种是将文件后缀更改为.mjs