Skip to content

Commit 803e000

Browse files
committed
chore: update
1 parent 8675b56 commit 803e000

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

website/docs/en/guide/basic/cli.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ When you run the command `npx rslib inspect` in the project root directory, the
7171
```text
7272
➜ npx rslib inspect
7373
74-
success Inspect config succeed, open following files to view the content:
74+
Inspect config succeed, open following files to view the content:
7575
7676
- Rsbuild Config: /project/dist/.rsbuild/rsbuild.config.mjs
7777
- Rspack Config (esm): /project/dist/.rsbuild/rspack.config.esm.mjs
@@ -94,8 +94,6 @@ If the current project has multiple output formats, such as ESM artifact and CJS
9494
9595
Inspect config succeed, open following files to view the content:
9696
97-
success Inspect config succeed, open following files to view the content:
98-
9997
- Rsbuild Config (esm): /project/dist/.rsbuild/rsbuild.config.esm.mjs
10098
- Rsbuild Config (cjs): /project/dist/.rsbuild/rsbuild.config.cjs.mjs
10199
- Rspack Config (esm): /project/dist/.rsbuild/rspack.config.esm.mjs

website/docs/en/guide/basic/configure-rslib.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ The configuration structure of Rslib looks like this:
1212
export default {
1313
// Array of library configurations.
1414
// Each object represents a set of independent configurations for each output format.
15-
// Different Rslib and Rsbuild configurations can be specified in each object.
15+
// Distinct configurations can be specified in each object, which is a superset of Rsbuild configurations.
1616
lib: [
1717
// The first set of configurations
1818
{
19-
// Independent Rslib configuration of ESM format
19+
// Independent lib configuration of ESM format
2020
format: 'esm', // options for the output format of JavaScript files
2121
bundle: true, // options for the build type
2222
autoExtension: true, // options for the extensions of JavaScript files
@@ -59,7 +59,7 @@ export default {
5959
{
6060
// The second set of configurations of CJS format
6161
format: 'cjs',
62-
// ... other independent Rslib / Rsbuild configurations
62+
// ... other independent lib configurations and Rsbuild configurations
6363
},
6464
// ... Extra sets of configurations (if needed)
6565
],
@@ -82,10 +82,10 @@ export default {
8282

8383
The configuration file exports a default object that includes a `lib` array and shared Rsbuild configuration options. You can find detailed descriptions of all configs on the [Configure Overview](/config/) page.
8484

85-
- **Lib Configuration (required)**: The `lib` array contains multiple objects, each representing a set of independent configurations tailored for different output formats, such as ESM and CJS. Each object within the `lib` array can specify distinct configurations for both Rslib and Rsbuild.
86-
- **Independent Rslib Configuration (required)**: The configuration options provided by Rslib. Rslib will transform these options into complex Rsbuild configuration of each object.
87-
- **Independent Rsbuild Configuration (optional)**: The configuration options provided by Rsbuild which can override the shared Rsbuild configuration outside.
88-
- **Shared Rsbuild Configuration (optional)**: Outside the `lib` array, there are shared Rsbuild configuration options that will be deep merged with independent Rsbuild configuration of each `lib` configuration object.
85+
- **[Lib Configuration](/config/lib) (at least one object is required)**: The `lib` array contains multiple objects, each representing a set of independent configurations tailored for different output formats, such as ESM and CJS. Each object within the `lib` array can specify distinct configurations, which is a superset of Rsbuild configurations.
86+
- **Independent [lib Configuration](/config/lib) (only [format](/config/lib/format) is required)**: The configuration options extended by Rslib. Rslib will transform these options into adapted Rsbuild configuration of each object.
87+
- **Independent [Rsbuild Configuration](/config/rsbuild) (optional)**: The configuration options provided by Rsbuild which can override the shared Rsbuild configuration outside.
88+
- **Shared [Rsbuild Configuration](/config/rsbuild) (optional)**: Outside the `lib` array, there are shared Rsbuild configuration options that will be deep merged with independent Rsbuild configuration of each `lib` configuration object.
8989

9090
Rslib generates corresponding Rsbuild [environments](https://rsbuild.dev/guide/advanced/environments) configurations based on the multiple build configurations of different output formats. See [Configuration Debug](#configuration-debug) for more details.
9191

@@ -196,8 +196,10 @@ DEBUG=rsbuild pnpm build
196196

197197
In debug mode, Rslib will write the Rsbuild / Rspack config to the dist directory, which is convenient for developers to view and debug.
198198

199+
Below is an example of a configuration for Rslib that builds both CJS and ESM output.
200+
199201
```
200-
success Inspect config succeed, open following files to view the content:
202+
Inspect config succeed, open following files to view the content:
201203
202204
- Rsbuild Config (esm): /project/dist/.rsbuild/rsbuild.config.esm.mjs
203205
- Rsbuild Config (cjs): /project/dist/.rsbuild/rsbuild.config.cjs.mjs

0 commit comments

Comments
 (0)