From e00aaf8d708fb70fd795f1a58565ed0e639587d0 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 9 Nov 2023 15:39:38 +0000 Subject: [PATCH] update content/posts/67.md --- content/posts/issues-67.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/posts/issues-67.md b/content/posts/issues-67.md index 2868d47..5924fc5 100644 --- a/content/posts/issues-67.md +++ b/content/posts/issues-67.md @@ -9,10 +9,12 @@ tags: [] > 你也可以参考 [阮一峰: ESM Module 的语法](https://es6.ruanyifeng.com/#docs/module) 和 [阮一峰: ESM Module 的加载实现](https://es6.ruanyifeng.com/#docs/module-loader) 获取更多信息。 较新的 NodeJS 版本(>=13.2.0)可以加载 CommonJS 和 ESM,用户需指明具体某些文件是什么模块类型。可以简单参考如下: + ![image](https://github.com/isayme/blog/assets/1747852/e416400e-f7bf-4c87-bf8d-324a0d36e0d6) # ESM import 常用场景 一图胜千言: + ![image](https://github.com/isayme/blog/assets/1747852/f686ae53-8116-47bf-be6f-812a1d7d3cb1) ## import { add } from 'moduleA'