diff --git a/website/docs/en/config/environments.mdx b/website/docs/en/config/environments.mdx index d85b44902c..53cb6899a8 100644 --- a/website/docs/en/config/environments.mdx +++ b/website/docs/en/config/environments.mdx @@ -8,6 +8,7 @@ Rsbuild supports building outputs for multiple environments. You can use `enviro ```ts interface EnvironmentConfig { + plugins?: RsbuildPlugins; dev?: Pick< DevConfig, 'hmr' | 'assetPrefix' | 'progressBar' | 'lazyCompilation' | 'writeToDisk' @@ -16,10 +17,10 @@ interface EnvironmentConfig { tools?: ToolsConfig; source?: SourceConfig; output?: OutputConfig; + resolve?: ResolveConfig; security?: SecurityConfig; performance?: PerformanceConfig; moduleFederation?: ModuleFederationConfig; - plugins?: RsbuildPlugins[]; } type Environments = { diff --git a/website/docs/en/config/html/template-parameters.mdx b/website/docs/en/config/html/template-parameters.mdx index 969b1fba2d..2505e659f4 100644 --- a/website/docs/en/config/html/template-parameters.mdx +++ b/website/docs/en/config/html/template-parameters.mdx @@ -26,9 +26,9 @@ type DefaultParameters = { }; ``` -Define the parameters in the HTML template, corresponding to the `templateParameters` config of [html-rspack-plugin](https://github.com/rspack-contrib/html-rspack-plugin). +Define the parameters in the HTML template, see [HTML Template - Template Parameters](/guide/basic/html-template#template-parameters) for detailed usage. -### Object Usage +## Object Usage If the value of `templateParameters` is an object, it will be merged with the default parameters using `Object.assign`. @@ -60,7 +60,7 @@ The compiled HTML code will be: ``` -### Function Usage +## Function Usage - **Type:** diff --git a/website/docs/zh/config/environments.mdx b/website/docs/zh/config/environments.mdx index 9e67b27c92..e882b91ef1 100644 --- a/website/docs/zh/config/environments.mdx +++ b/website/docs/zh/config/environments.mdx @@ -8,6 +8,7 @@ Rsbuild 支持同时为多个环境构建产物。你可以使用 `environments` ```ts interface EnvironmentConfig { + plugins?: RsbuildPlugins; dev?: Pick< DevConfig, 'hmr' | 'assetPrefix' | 'progressBar' | 'lazyCompilation' | 'writeToDisk' @@ -16,10 +17,10 @@ interface EnvironmentConfig { tools?: ToolsConfig; source?: SourceConfig; output?: OutputConfig; + resolve?: ResolveConfig; security?: SecurityConfig; performance?: PerformanceConfig; moduleFederation?: ModuleFederationConfig; - plugins?: RsbuildPlugins[]; } type Environments = { diff --git a/website/docs/zh/config/html/template-parameters.mdx b/website/docs/zh/config/html/template-parameters.mdx index 9efa4e4702..b02c47cf9c 100644 --- a/website/docs/zh/config/html/template-parameters.mdx +++ b/website/docs/zh/config/html/template-parameters.mdx @@ -26,9 +26,9 @@ type DefaultParameters = { }; ``` -定义 HTML 模板中的参数,对应 [html-rspack-plugin](https://github.com/rspack-contrib/html-rspack-plugin) 的 `templateParameters` 配置项。 +定义 HTML 模板中的参数,详细用法请参考 [配置 HTML 模板 - 模板参数](/guide/basic/html-template#模板参数)。 -### 对象用法 +## 对象用法 如果 `templateParameters` 的值是一个对象,它会和默认参数通过 `Object.assign` 合并。 @@ -60,7 +60,7 @@ export default { ``` -### 函数用法 +## 函数用法 - **类型:**