Skip to content

Commit aba7cd2

Browse files
committed
chore: update
1 parent cf463e0 commit aba7cd2

File tree

5 files changed

+81
-5
lines changed

5 files changed

+81
-5
lines changed

website/docs/en/config/lib/auto-external.mdx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,36 @@ type AutoExternal =
1717

1818
Whether to automatically externalize dependencies of different dependency types and do not bundle them.
1919

20+
## Object Type
21+
22+
### autoExternal.dependencies
23+
24+
- **Type:** `boolean`
25+
- **Default:** `true`
26+
27+
Whether to externalize dependencies of type `dependencies`.
28+
29+
### autoExternal.optionalDependencies
30+
31+
- **Type:** `boolean`
32+
- **Default:** `true`
33+
34+
Whether to externalize dependencies of type `optionalDependencies`.
35+
36+
### autoExternal.peerDependencies
37+
38+
- **Type:** `boolean`
39+
- **Default:** `true`
40+
41+
Whether to externalize dependencies of type `peerDependencies`.
42+
43+
### autoExternal.devDependencies
44+
45+
- **Type:** `boolean`
46+
- **Default:** `false`
47+
48+
Whether to bundle dependencies of type `devDependencies`.
49+
2050
## Default Value
2151

2252
The default value of `autoExternal` is `true`, which means the following dependency types will **not be bundled**:
@@ -29,7 +59,7 @@ And the following dependency types will be **bundled**:
2959

3060
- `devDependencies`
3161

32-
It is equivalent to the following configuration:
62+
This configuration is equivalent to the following object type:
3363

3464
```ts
3565
export default {

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ type Banner = {
1414

1515
Inject content into the top of each JS, CSS or DTS file.
1616

17+
## Object Type
18+
19+
### banner.js
20+
21+
- **Type:** `string`
22+
- **Default:** `undefined`
23+
24+
Inject content into the top of each JS file.
25+
26+
### banner.css
27+
28+
- **Type:** `string`
29+
- **Default:** `undefined`
30+
31+
Inject content into the top of each CSS file.
32+
33+
### banner.dts
34+
35+
- **Type:** `string`
36+
- **Default:** `undefined`
37+
38+
Inject content into the top of each DTS file.
39+
1740
## Notice
1841

1942
The banner content in JS/CSS file is based on the [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) of Rspack. You should notice the following points:

website/docs/en/config/lib/external-helpers.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
- **Type:** `boolean`
44
- **Default:** `false`
55

6-
Whether to import SWC helper functions from `@swc/helpers` instead of inlining them.
6+
Whether to import SWC helper functions from [@swc/helpers](https://www.npmjs.com/package/@swc/helpers) instead of inlining them.
77

88
By default, the output JavaScript file may depend on helper functions to support the target environment or output format, and these helper functions will be inlined in the file that requires it.
99

1010
When `externalHelpers` set to `true`, the output JavaScript will import helper functions from the external module `@swc/helpers`.
1111

12-
::: tip
12+
::: note
1313

1414
Make sure to declare the `@swc/helpers` in `dependencies` field of `package.json`.
1515

@@ -90,7 +90,7 @@ export default {
9090

9191
Below is the output JavaScript file:
9292

93-
```js title="index.js"
93+
```js title="index.js" {1-2}
9494
import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_class_call_check__ from '@swc/helpers/_/_class_call_check';
9595
import * as __WEBPACK_EXTERNAL_MODULE__swc_helpers_create_class__ from '@swc/helpers/_/_create_class';
9696
var src_FOO = /*#__PURE__*/ (function () {

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ type Footer = {
1414

1515
Inject content into the bottom of each JS, CSS or DTS file.
1616

17+
## Object Type
18+
19+
### footer.js
20+
21+
- **Type:** `string`
22+
- **Default:** `undefined`
23+
24+
Inject content into the bottom of each JS file.
25+
26+
### footer.css
27+
28+
- **Type:** `string`
29+
- **Default:** `undefined`
30+
31+
Inject content into the bottom of each CSS file.
32+
33+
### footer.dts
34+
35+
- **Type:** `string`
36+
- **Default:** `undefined`
37+
38+
Inject content into the bottom of each DTS file.
39+
1740
## Notice
1841

1942
The footer content in JS/CSS file is based on the [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) of Rspack. You should notice the following points:

website/docs/en/config/lib/umd-name.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- **Type:** `string`
44
- **Default:** `undefined`
55

6-
The export name of the UMD bundle.
6+
The export name of the [UMD](/guide/basic/output-format#umd) bundle.
77

88
:::tip
99

0 commit comments

Comments
 (0)