> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# resolve

Options for module resolution.

## resolve.aliasStrategy [![resolve.aliasStrategy](https://assets.rspack.rs/rsbuild/rsbuild-logo.svg)resolve.aliasStrategy](https://rsbuild.rs/config/resolve/alias-strategy)
Control the priority between the `resolve.alias` option and the `paths` option in `tsconfig.json`.

## resolve.alias [![resolve.alias](https://assets.rspack.rs/rsbuild/rsbuild-logo.svg)resolve.alias](https://rsbuild.rs/config/resolve/alias)
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.rs/config/resolve#resolvealias) config of Rspack.

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

## resolve.dedupe [![resolve.dedupe](https://assets.rspack.rs/rsbuild/rsbuild-logo.svg)resolve.dedupe](https://rsbuild.rs/config/resolve/dedupe)
Force Rstest to resolve the specified packages from project root, which is useful for deduplicating packages and reducing the bundle size.

## resolve.extensions [![resolve.extensions](https://assets.rspack.rs/rsbuild/rsbuild-logo.svg)resolve.extensions](https://rsbuild.rs/config/resolve/extensions)
Automatically resolve file extensions when importing modules. This means you can import files without explicitly writing their extensions.

## resolve.conditionNames [![resolve.conditionNames](https://assets.rspack.rs/rsbuild/rsbuild-logo.svg)resolve.conditionNames](https://rsbuild.rs/config/resolve/condition-names)
Control the condition names used when resolving the `exports` field of a package.

## resolve.mainFields [![resolve.mainFields](https://assets.rspack.rs/rsbuild/rsbuild-logo.svg)resolve.mainFields](https://rsbuild.rs/config/resolve/main-fields)
Control the priority order of package entry fields such as `main`, `module`, and `browser`.
