Skip to content

Commit 9c5190a

Browse files
authored
docs: add default module definition systems (#878)
1 parent 07b49c2 commit 9c5190a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

website/docs/en/config/lib/format.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ See [Output Format](/guide/basic/output-format) and [Module Federation](/guide/a
1313
The `umd` format only works when [bundle](/config/lib/bundle) is set to `true`.
1414

1515
:::
16+
17+
## Module definition systems
18+
19+
In different output formats, Rslib uses the following default module definition systems:
20+
21+
- `esm`[modern-module](https://rspack.dev/config/output#type-modern-module)
22+
- `cjs`[commonjs-static](https://rspack.dev/config/output#type-commonjs-static)
23+
- `umd`[umd](https://rspack.dev/config/output#type-umd)

website/docs/zh/config/lib/format.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@
1111
::: note
1212
`umd` 格式仅在 [bundle](/config/lib/bundle) 设置为 `true` 时有效。
1313
:::
14+
15+
## 模块定义系统
16+
17+
在不同的产物格式下,Rslib 默认使用的模块定义系统如下:
18+
19+
- `esm`[modern-module](https://rspack.dev/zh/config/output#type-modern-module)
20+
- `cjs`[commonjs-static](https://rspack.dev/zh/config/output#type-commonjs-static)
21+
- `umd`[umd](https://rspack.dev/zh/config/output#type-umd)

0 commit comments

Comments
 (0)