Skip to content

Commit befb09a

Browse files
authored
docs: add bundleless mode img and polish the some words (#737)
1 parent a6f8ca9 commit befb09a

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default defineConfig({
130130
});
131131
```
132132

133-
When `bundle` is set to `false`, as known as bundleless mode, Rslib will only transform the code into multiple files.
133+
When `bundle` is set to `false`, as known as bundleless mode, Rslib will transform the code into multiple files.
134134

135135
```diff
136136
.

website/docs/en/guide/basic/output-structure.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ A bundle is a package of build artifacts, which may be a single file or multiple
88

99
bundleless, on the other hand, means that each source file is compiled and built separately, but not bundled together. Each output file can be found with its corresponding source code file. The process of bundleless build can also be understood as the process of code conversion of source files only.
1010

11+
![rslib-bundleless-mode](https://assets.rspack.dev/rslib/rslib-bundleless-mode.png)
12+
1113
They have their own benefits.
1214

13-
- bundle can reduce the size of build artifacts and also pre-package dependencies to reduce the size of installed dependencies. Packaging libraries in advance can speed up application project builds.
15+
- bundle can reduce the size of build artifacts and also prebundle dependencies to reduce the size of installed dependencies and increase security. Packaging libraries in advance can speed up application project builds.
1416
- bundleless maintains the original file structure and is more conducive to debugging and tree shaking.
1517

1618
:::warning

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- **类型:** `boolean`
44
- **默认值:** `undefined`
55

6-
指定是否打包库,当 `bundle` 设置为 `true` 时称为 bundle 模式,设置为 `false` 时称为 bundleless 模式。更多详情请参见 [bundle / bundleless](/guide/basic/output-structure#bundle--bundleless)
6+
指定是否打包库,当 `bundle` 设置为 `true` 时称为 bundle 模式,设置为 `false` 时称为 bundleless 模式。更多详情请参考 [bundle / bundleless](/guide/basic/output-structure#bundle--bundleless)
77

88
## 设置入口
99

@@ -128,7 +128,7 @@ export default defineConfig({
128128
});
129129
```
130130

131-
`bundle` 设置为 `false` 时,也称为 bundleless 模式,Rslib 只会将代码转换为多个文件
131+
`bundle` 设置为 `false` 时,也称为 bundleless 模式,Rslib 会将代码转换为多个文件
132132

133133
```diff
134134
.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type Syntax = EcmaScriptVersion | string[];
2525

2626
配置 JavaScript 和 CSS 将被降级的语法版本。
2727

28-
参见 [产物兼容性 - 语法降级](/guide/advanced/output-compatibility) 了解更多详情。
28+
参考 [产物兼容性 - 语法降级](/guide/advanced/output-compatibility) 了解更多详情。
2929

3030
## 设置 ECMAScript 版本
3131

website/docs/zh/guide/basic/output-structure.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
而 bundleless,则是指对每个源文件单独进行编译构建,但是并不将它们打包在一起。每一个产物文件都可以找到与之相对应的源码文件。bundleless 构建的过程,也可以理解为仅对源文件进行代码转换的过程。
1010

11+
![rslib-bundleless-mode](https://assets.rspack.dev/rslib/rslib-bundleless-mode.png)
12+
1113
它们有各自的好处:
1214

13-
- bundle 可以减少构建产物的体积,也可以对依赖预打包,减小安装依赖的体积。提前对库进行打包,可以加快应用项目构建的速度。
15+
- bundle 可以减少构建产物的体积,也可以对依赖预打包,减小安装依赖的体积,增加安全性。提前对库进行打包,可以加快应用项目构建的速度。
1416
- bundleless 则是可以保持原有的文件结构,更有利于调试和 tree shaking。
1517

1618
:::warning

0 commit comments

Comments
 (0)