Skip to content

Commit 189f401

Browse files
authored
docs: add less parallel to build performance guide (#5809)
1 parent c501c04 commit 189f401

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

packages/plugin-less/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export type PluginLessOptions = {
9797
exclude?: Rspack.RuleSetCondition;
9898
/**
9999
* Whether to enable parallel loader execution, running `less-loader` in worker
100-
* threads. When enabled, this typically improves build performance when processing
100+
* threads. When enabled, this typically improves build performance when compiling
101101
* large numbers of Less modules.
102102
* @experimental This is an experimental Rspack feature and will not work if your Less
103103
* options contain functions.

website/docs/en/guide/optimization/build-performance.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ When using Tailwind CSS v3, if the `content` field in `tailwind.config.js` is no
3232

3333
Refer to [Tailwind CSS v3 - Optimize build performance](/guide/styling/tailwindcss-v3#optimize-build-performance) for more details.
3434

35+
### Parallel Less compilation
36+
37+
If your project uses the [@rsbuild/plugin-less](/plugins/list/plugin-less) plugin and contains a large number of Less files, you can try enabling parallel compilation to improve build performance.
38+
39+
Refer to [Less Plugin - parallel](/plugins/list/plugin-less#parallel) for more details.
40+
3541
### Tool selection
3642

3743
While Rsbuild delivers excellent build performance out of the box, certain JavaScript-based tools can negatively impact overall build performance, particularly in large-scale projects.

website/docs/en/plugins/list/plugin-less.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pluginLess({
126126
- **Default:** `false`
127127
- **Version:** Added in v1.4.0
128128

129-
Whether to enable parallel loader execution, running `less-loader` in worker threads. When enabled, this typically improves build performance when processing large numbers of Less modules.
129+
Whether to enable parallel loader execution, running `less-loader` in worker threads. When enabled, this typically improves build performance when compiling large numbers of Less modules.
130130

131131
Note that this option is experimental and may not work if your Less options contain functions.
132132

website/docs/zh/guide/optimization/build-performance.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ Rsbuild 提供了 [performance.buildCache](/config/performance/build-cache) 配
3232

3333
参考 [Tailwind CSS v3 - 优化构建性能](/guide/styling/tailwindcss-v3#优化构建性能) 了解更多。
3434

35+
### 并行编译 Less 文件
36+
37+
如果你的项目使用了 [@rsbuild/plugin-less](/plugins/list/plugin-less) 插件,且项目中包含大量 Less 文件,可以尝试开启并发编译功能来提升编译性能。
38+
39+
参考 [Less 插件 - parallel](/plugins/list/plugin-less#parallel) 了解更多。
40+
3541
### 工具选择
3642

3743
尽管 Rsbuild 本身已经提供了优秀的构建性能,但当你使用某些基于 JavaScript 的工具时,可能会对整体构建性能产生负面影响,特别是在大型项目中。

website/docs/zh/plugins/list/plugin-less.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pluginLess({
126126
- **默认值:** `false`
127127
- **版本:** 添加于 v1.4.0
128128

129-
是否开启并行 loader 执行,在 worker 线程中运行 `less-loader`。开启后,在处理大量 Less 模块时通常会有构建性能提升。
129+
是否开启并行 loader 执行,在 worker 线程中运行 `less-loader`。开启后,在编译大量 Less 模块时通常会有构建性能提升。
130130

131131
注意该选项为实验性功能,当 Less 选项中包含函数时将无法正常工作。
132132

0 commit comments

Comments
 (0)