Skip to content

Commit 2b08425

Browse files
authored
docs: modify description of resolve.alias (#805)
1 parent 3a49417 commit 2b08425

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

website/docs/en/config/rsbuild/resolve.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Control the priority between the `paths` option in `tsconfig.json` and the `reso
1010

1111
## resolve.alias <RsbuildDocBadge path="/config/resolve/alias" text="resolve.alias" />
1212

13-
Create aliases to import or require certain modules, same as the [resolve.alias](https://rspack.dev/config/resolve#resolvealias) config of Rspack.
13+
Set the alias for the module path, which is used to simplify the import path or redirect the module reference, similar to the [resolve.alias](https://rspack.dev/config/resolve#resolvealias) config of Rspack.
1414

1515
For TypeScript projects, you only need to configure [compilerOptions.paths](https://www.typescriptlang.org/tsconfig/#paths) in the `tsconfig.json` file. Rslib will automatically recognize it, so there is no need to configure the `resolve.alias` option separately.
1616

website/docs/zh/config/rsbuild/resolve.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { RsbuildDocBadge } from '@components/RsbuildDocBadge';
1010

1111
## resolve.alias <RsbuildDocBadge path="/config/resolve/alias" text="resolve.alias" />
1212

13-
设置文件引用的别名,对应 Rspack 的 [resolve.alias](https://rspack.dev/zh/config/resolve#resolvealias) 配置。
13+
设置模块路径的别名,用于简化导入路径或重定向模块引用,类似于 Rspack 的 [resolve.alias](https://rspack.dev/zh/config/resolve#resolvealias) 配置。
1414

1515
对于 TypeScript 项目,你只需要在 `tsconfig.json` 中配置 [compilerOptions.paths](https://www.typescriptlang.org/tsconfig/#paths) 即可,Rslib 会自动识别它,不需要额外配置 `resolve.alias` 字段。
1616

0 commit comments

Comments
 (0)