Skip to content

Commit 4802ffa

Browse files
authored
docs: modify ESM and CJS mdx component (#1095)
1 parent d7faff2 commit 4802ffa

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

website/docs/en/guide/basic/output-format.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Library authors need to carefully consider which module formats to support. Let'
1313

1414
### What are ESM and CJS?
1515

16-
- **ESM**: ESM is <ESM />
16+
- **ESM**: <ESM />
1717

18-
- **CommonJS**: [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules) is <CJS />
18+
- **CommonJS**: <CJS />
1919

2020
### What is the dilemma of ESM / CJS
2121

website/docs/en/guide/start/glossary.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import MF from '../../shared/components/MF.mdx';
77

88
## ESM
99

10-
ESM stands for ECMAScript Modules, <ESM />
10+
<ESM />
1111

1212
## CJS
1313

14-
CJS stands for [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules), <CJS />
14+
<CJS />
1515

1616
## UMD
1717

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a module system used in JavaScript, particularly in server-side environments like Node.js. It was created to allow JavaScript to be used outside of the browser by providing a way to manage modules and dependencies.
1+
CJS stands for [CommonJS modules](https://nodejs.org/api/modules.html#modules-commonjs-modules), which is a module system used in JavaScript, particularly in server-side environments like Node.js. It was created to allow JavaScript to be used outside of the browser by providing a way to manage modules and dependencies.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a modern module system introduced in ES2015 that allows JavaScript code to be organized into reusable, self-contained modules. ESM is now the standard for both [browser](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and [Node.js](https://nodejs.org/api/esm.html) environments, replacing older module systems like [CommonJS (CJS)](https://nodejs.org/api/modules.html) and [AMD](https://requirejs.org/docs/whyamd.html).
1+
ESM stands for [ECMAScript modules](https://nodejs.org/api/esm.html#modules-ecmascript-modules), which is a modern module system introduced in ES2015 that allows JavaScript code to be organized into reusable, self-contained modules. ESM is now the standard for both [browser](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and [Node.js](https://nodejs.org/api/esm.html) environments, replacing older module systems like [CommonJS (CJS)](https://nodejs.org/api/modules.html) and [AMD](https://requirejs.org/docs/whyamd.html).

website/docs/zh/guide/basic/output-format.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Rslib 支持多种 JavaScript 文件的输出格式:[ESM](#esm--cjs)、[CJS](#
1313

1414
### 什么是 ESM 和 CJS?
1515

16-
- **ESM**: ESM 是<ESM />
16+
- **ESM**: <ESM />
1717

18-
- **CommonJS**: [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules)<CJS />
18+
- **CommonJS**: <CJS />
1919

2020
### ESM 和 CJS 的困境
2121

website/docs/zh/guide/start/glossary.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import MF from '../../shared/components/MF.mdx';
77

88
## ESM
99

10-
ESM 代表 ECMAScript 模块,<ESM />
10+
<ESM />
1111

1212
## CJS
1313

14-
CJS 代表 [CommonJS](https://nodejs.org/api/modules.html#modules-commonjs-modules)<CJS />
14+
<CJS />
1515

1616
## UMD
1717

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
一种在 JavaScript 中使用的模块系统,特别是在像 Node.js 这样的服务器端环境中。它的诞生是为了通过提供一种管理模块和依赖项的方法,允许 JavaScript 在浏览器之外使用。
1+
CJS 代表 [CommonJS modules](https://nodejs.org/api/modules.html#modules-commonjs-modules),这是一种在 JavaScript 中使用的模块系统,特别是在像 Node.js 这样的服务器端环境中。它的诞生是为了通过提供一种管理模块和依赖项的方法,允许 JavaScript 在浏览器之外使用。
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
一种在 ES2015 中引入的现代模块系统,允许将 JavaScript 代码组织成可重用的、自包含的模块。ESM 现在是 [浏览器](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Modules)[Node.js](https://nodejs.org/api/esm.html) 环境的标准,取代了旧的模块系统,如 [CommonJS (CJS)](https://nodejs.org/api/modules.html)[AMD](https://requirejs.org/docs/whyamd.html)
1+
ESM 代表 [ECMAScript modules](https://nodejs.org/api/esm.html#modules-ecmascript-modules),这是一种在 ES2015 中引入的现代模块系统,允许将 JavaScript 代码组织成可重用的、自包含的模块。ESM 现在是 [浏览器](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Modules)[Node.js](https://nodejs.org/api/esm.html) 环境的标准,取代了旧的模块系统,如 [CommonJS (CJS)](https://nodejs.org/api/modules.html)[AMD](https://requirejs.org/docs/whyamd.html)

0 commit comments

Comments
 (0)