From 164178b6dffdea9da1d99cd20546008fc2526ce8 Mon Sep 17 00:00:00 2001 From: Qingyu Wang Date: Fri, 31 May 2024 10:31:07 +0800 Subject: [PATCH] docs: update optimization.moduleIds --- website/docs/en/config/optimization.mdx | 3 ++- website/docs/zh/config/optimization.mdx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/en/config/optimization.mdx b/website/docs/en/config/optimization.mdx index 0eb06b1d1035..9343947be59d 100644 --- a/website/docs/en/config/optimization.mdx +++ b/website/docs/en/config/optimization.mdx @@ -10,10 +10,11 @@ Rspack will select appropriate optimization configuration based on the [`mode`]( ## optimization.moduleIds - + | option | description | | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `natural` | Use numeric ids in order of usage. This option is enabled by default when mode is `'none'`. | | `named` | Use meaningful, easy-to-debug content as id. This option is enabled by default in development mode. | | `deterministic` | Use the hashed module identifier as the id to benefit from long-term caching. This option is enabled by default in production mode. | diff --git a/website/docs/zh/config/optimization.mdx b/website/docs/zh/config/optimization.mdx index 831433104271..63698da374c2 100644 --- a/website/docs/zh/config/optimization.mdx +++ b/website/docs/zh/config/optimization.mdx @@ -10,10 +10,11 @@ import WebpackLicense from '@components/webpack-license'; ## optimization.moduleIds - + | 选项 | 描述 | | --------------- | --------------------------------------------------------------------------------------- | +| `natural` | 根据模块加载的顺序使用自增数字作为模块 id。此选项会在 `mode` 为 `none` 时默认开启。 | | `named` | 使用有意义、方便调试的内容当作模块 id。此选项会在开发环境下默认开启。 | | `deterministic` | 使用对模块标识符哈希后的数字当作模块 id,有益于长期缓存。此选项会在生产环境下默认开启。 |