Skip to content

Commit e39369b

Browse files
authored
docs: correct externalHelpers highlights (#796)
1 parent 32cf8da commit e39369b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Whether to import SWC helper functions from [@swc/helpers](https://www.npmjs.com
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

10-
When `externalHelpers` set to `true`, the output JavaScript will import helper functions from the external module `@swc/helpers`.
10+
When `externalHelpers` set to `true`, the output JavaScript will import helper functions from the external module `@swc/helpers`. This helps reduce duplicate helper code in the final bundles, and reduces the bundle size.
1111

1212
::: note
1313

@@ -29,7 +29,7 @@ export default class FOO {
2929

3030
When `externalHelpers` is disabled, the output JavaScript will inline helper functions.
3131

32-
```ts title="rslib.config.ts" {6}
32+
```ts title="rslib.config.ts" {5}
3333
export default {
3434
lib: [
3535
{
@@ -79,7 +79,7 @@ export { src_FOO as default };
7979

8080
When `externalHelpers` is enabled, the output JavaScript will import helper functions from the external module `@swc/helpers`.
8181

82-
```ts title="rslib.config.ts" {6}
82+
```ts title="rslib.config.ts" {5}
8383
export default {
8484
lib: [
8585
{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
默认情况下,输出的 JavaScript 文件可能需要辅助函数来支持目标环境或输出格式,这些辅助函数会被内联到需要它们的文件中。
99

10-
`externalHelpers` 设置为 `true` 时,输出的 JavaScript 将从外部模块 `@swc/helpers` 导入辅助函数。
10+
`externalHelpers` 设置为 `true` 时,输出的 JavaScript 将从外部模块 `@swc/helpers` 导入辅助函数,这有助于减少最终包中的重复辅助代码,减小包体积
1111

1212
::: note
1313

@@ -29,7 +29,7 @@ export default class FOO {
2929

3030
`externalHelpers` 禁用时,输出的 JavaScript 将内联辅助函数。
3131

32-
```ts title="rslib.config.ts" {6}
32+
```ts title="rslib.config.ts" {5}
3333
export default {
3434
lib: [
3535
{
@@ -79,7 +79,7 @@ export { src_FOO as default };
7979

8080
当启用 `externalHelpers` 时,输出的 JavaScript 将从外部模块 `@swc/helpers` 导入辅助函数。
8181

82-
```ts title="rslib.config.ts" {6}
82+
```ts title="rslib.config.ts" {5}
8383
export default {
8484
lib: [
8585
{

0 commit comments

Comments
 (0)