短评 · ·

X 归档 2021-09-25

1 条动态 · 图 0 · 视频 0
Typescript 4.5 is on track to support the native ES Module features introduced in Node 12 thanks to Wes Wigham 🎉

🔥 *.mjs & *.cjs files are importable
🔥 "type": "module" in package.json
🔥 "exports" in package.json
🔥 native import() in CJS files

https://github.com/microsoft/TypeScript/pull/45884
多亏了 Wes Wigham,TypeScript 4.5 有望支持 Node 12 引入的原生 ES Module 特性 🎉

🔥 可导入 *.mjs 和 *.cjs 文件
🔥 package.json 里的 "type": "module"
🔥 package.json 里的 "exports"
🔥 CJS 文件里的原生 import()

https://github.com/microsoft/TypeScript/pull/45884