Skip to content

Commit 7239346

Browse files
committed
chore: update
1 parent 6bf1632 commit 7239346

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

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

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ The configuration structure of Rslib looks like this:
1010

1111
```js title="rslib.config.mjs"
1212
export default {
13-
// Array of library configurations.
13+
// Array of Lib configurations.
1414
// Each object represents a set of independent configurations for each output format.
15-
// Distinct configurations can be specified in each object, which is a superset of Rsbuild configurations.
15+
// Distinct configurations can be specified in each object, which is a superset of Rsbuild configurations along with Rslib's specific configurations.
1616
lib: [
17-
// The first set of configurations
17+
// The first set of Lib configurations
1818
{
19-
// Independent lib configuration of ESM format
19+
// Independent Rslib specific configurations
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
@@ -41,7 +41,7 @@ export default {
4141
footer: {
4242
// options for the file footer
4343
},
44-
// Independent Rsbuild configuration
44+
// Independent Rsbuild configurations
4545
output: {
4646
// options for build outputs
4747
},
@@ -54,16 +54,16 @@ export default {
5454
plugins: [
5555
// configure Rsbuild plugins
5656
],
57-
// other independent Rsbuild configuration options
57+
// other independent Rsbuild configurations
5858
},
5959
{
60-
// The second set of configurations of CJS format
60+
// The second set of Lib configurations
6161
format: 'cjs',
62-
// ... other independent lib configurations and Rsbuild configurations
62+
// ... other independent Rslib specific configurations and Rsbuild configurations
6363
},
64-
// ... Extra sets of configurations (if needed)
64+
// ... Additional sets of Lib configurations (if needed)
6565
],
66-
// Shared Rsbuild configuration which will be merged into each of the above lib configuration objects
66+
// Shared Rsbuild configurations
6767
output: {
6868
// options for build outputs
6969
},
@@ -76,18 +76,17 @@ export default {
7676
plugins: [
7777
// configure Rsbuild plugins
7878
],
79-
// ... other Rsbuild configuration options
79+
// ... other Rsbuild configurations
8080
};
8181
```
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](/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.
85+
- **[Lib configurations](/config/lib) (at least one object is required)**: The `lib` array contains multiple objects, each representing a set of independent configurations that will generate different outputs. Each object within the `lib` array can specify unique configurations, which is a superset of Rsbuild
86+
configurations along with Rslib's specific configurations.
87+
- **Shared [Rsbuild configurations](/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.
8988

90-
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.
89+
Rslib generates corresponding Rsbuild [environments](https://rsbuild.dev/guide/advanced/environments) configurations based on the multiple build configurations of different output formats. You can view the final generated configurations through the [configuration debug](#configuration-debug) documentation.
9190

9291
## Configuration Usage
9392

0 commit comments

Comments
 (0)