Skip to content

Commit 16d51a1

Browse files
authored
docs: improve htmlPlugin configuration docs (#7169)
1 parent 9d5e925 commit 16d51a1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/document/main-doc/docs/en/configure/app/tools/html-plugin.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ const defaultOptions = {
3333
};
3434
```
3535

36+
:::warning
37+
SSR Application does not enable the `minify.removeComments` configuration, otherwise the SSR rendering will fail.
38+
:::
39+
40+
3641
The configs of [html-rspack-plugin](https://github.com/rspack-contrib/html-rspack-plugin) or [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) can be modified through `tools.htmlPlugin`.
3742

3843
import RsbuildConfig from '@site-docs-en/components/rsbuild-config-tooltip';

packages/document/main-doc/docs/zh/configure/app/tools/html-plugin.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const defaultOptions = {
3333
};
3434
```
3535

36+
:::warning
37+
SSR 应用请勿启用 `minify.removeComments` 配置项,否则会导致 SSR 渲染失败。
38+
:::
39+
3640
通过 `tools.htmlPlugin` 可以修改 [html-rspack-plugin](https://github.com/rspack-contrib/html-rspack-plugin)[html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 的配置项。
3741

3842
import RsbuildConfig from '@site-docs/components/rsbuild-config-tooltip';

0 commit comments

Comments
 (0)