Skip to content

Commit c6ad73b

Browse files
committed
chore: update
1 parent 9589b71 commit c6ad73b

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,3 @@ In different output formats, Rslib uses the following default module definition
2121
- `esm`[modern-module](https://rspack.dev/config/output#type-modern-module)
2222
- `cjs`[commonjs-static](https://rspack.dev/config/output#type-commonjs-static)
2323
- `umd`[umd](https://rspack.dev/config/output#type-umd)
24-
25-
If you want to use a different module definition system, you can configure the [tools.rspack.output.library.type](https://rspack.dev/config/output#outputlibrarytype) option. Below is an example that sets the module definition system for the `cjs` format to `commonjs`:
26-
27-
```ts title="rslib.config.ts"
28-
export default {
29-
lib: [
30-
{
31-
format: 'cjs',
32-
tools: {
33-
rspack: {
34-
output: {
35-
library: {
36-
type: 'commonjs',
37-
},
38-
},
39-
},
40-
},
41-
},
42-
],
43-
};
44-
```

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,3 @@
1919
- `esm`[modern-module](https://rspack.dev/zh/config/output#type-modern-module)
2020
- `cjs`[commonjs-static](https://rspack.dev/zh/config/output#type-commonjs-static)
2121
- `umd`[umd](https://rspack.dev/zh/config/output#type-umd)
22-
23-
如果你想要使用其他的模块定义系统,可以配置 [tools.rspack.output.library.type](https://rspack.dev/zh/config/output#outputlibrarytype) 选项。以下是一个示例,将 `cjs` 产物的模块定义系统设置为 `commonjs`
24-
25-
```ts title="rslib.config.ts"
26-
export default {
27-
lib: [
28-
{
29-
format: 'cjs',
30-
tools: {
31-
rspack: {
32-
output: {
33-
library: {
34-
type: 'commonjs',
35-
},
36-
},
37-
},
38-
},
39-
},
40-
],
41-
};
42-
```

0 commit comments

Comments
 (0)