Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/docs/en/guide/basic/output-format.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Library authors need to carefully consider which module formats to support. Let'

### What are ESM and CJS?

- **ESM**: ESM is <ESM />
- **ESM**: <ESM />

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

### What is the dilemma of ESM / CJS

Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/guide/start/glossary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import MF from '../../shared/components/MF.mdx';

## ESM

ESM stands for ECMAScript Modules, <ESM />
<ESM />

## CJS

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

## UMD

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/shared/components/CJS.mdx
Original file line number Diff line number Diff line change
@@ -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.
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.
2 changes: 1 addition & 1 deletion website/docs/en/shared/components/ESM.mdx
Original file line number Diff line number Diff line change
@@ -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).
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).
4 changes: 2 additions & 2 deletions website/docs/zh/guide/basic/output-format.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Rslib 支持多种 JavaScript 文件的输出格式:[ESM](#esm--cjs)、[CJS](#

### 什么是 ESM 和 CJS?

- **ESM**: ESM 是<ESM />
- **ESM**: <ESM />

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

### ESM 和 CJS 的困境

Expand Down
4 changes: 2 additions & 2 deletions website/docs/zh/guide/start/glossary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import MF from '../../shared/components/MF.mdx';

## ESM

ESM 代表 ECMAScript 模块,<ESM />
<ESM />

## CJS

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

## UMD

Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/shared/components/CJS.mdx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
一种在 JavaScript 中使用的模块系统,特别是在像 Node.js 这样的服务器端环境中。它的诞生是为了通过提供一种管理模块和依赖项的方法,允许 JavaScript 在浏览器之外使用。
CJS 代表 [CommonJS modules](https://nodejs.org/api/modules.html#modules-commonjs-modules),这是一种在 JavaScript 中使用的模块系统,特别是在像 Node.js 这样的服务器端环境中。它的诞生是为了通过提供一种管理模块和依赖项的方法,允许 JavaScript 在浏览器之外使用。
2 changes: 1 addition & 1 deletion website/docs/zh/shared/components/ESM.mdx
Original file line number Diff line number Diff line change
@@ -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)。
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)。
Loading