docs: add documentation for more resolve options#1392
Conversation
✅ Deploy Preview for rslib ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR enhances the resolve configuration documentation by adding documentation for two additional resolve options (conditionNames and mainFields) and improving existing descriptions for consistency and clarity.
- Added documentation for
resolve.conditionNamesto specify condition names for matching package exports field entry points - Added documentation for
resolve.mainFieldsto control package.json field priority for entry file resolution - Updated
resolve.aliasStrategydescription for better clarity and cross-referencing - Fixed link format for
outBasereference from relative to absolute path format
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| website/docs/en/config/rsbuild/resolve.mdx | Added English documentation for conditionNames and mainFields options, updated aliasStrategy description, and corrected outBase link format |
| website/docs/zh/config/rsbuild/resolve.mdx | Added Chinese documentation for conditionNames and mainFields options, updated aliasStrategy description, and corrected outBase link format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## resolve.aliasStrategy <RsbuildDocBadge path="/config/resolve/alias-strategy" text="resolve.aliasStrategy" /> | ||
|
|
||
| Control the priority between the `resolve.alias` option and the `paths` option in `tsconfig.json`. | ||
| Set the strategy for path alias resolution, to control the priority relationship between the paths option in `tsconfig.json` and the [resolve.alias](/config/rsbuild/resolve#resolvealias) option. |
There was a problem hiding this comment.
The sentence has a grammatical issue with "paths option" - it should use the article "the" before "paths option" to match the structure used for "the resolve.alias option".
| Set the strategy for path alias resolution, to control the priority relationship between the paths option in `tsconfig.json` and the [resolve.alias](/config/rsbuild/resolve#resolvealias) option. | |
| Set the strategy for path alias resolution, to control the priority relationship between the the paths option in `tsconfig.json` and the [resolve.alias](/config/rsbuild/resolve#resolvealias) option. |
|
|
||
| ## resolve.mainFields <RsbuildDocBadge path="/config/resolve/main-fields" text="resolve.mainFields" /> | ||
|
|
||
| Controls the priority of fields in a package.json used to locate a package's entry file. It is the ordered list of package.json fields Rspack will try when resolving an npm package's entry point. |
There was a problem hiding this comment.
The sentence contains a grammatical inconsistency. The phrase "It is the ordered list of package.json fields Rspack will try" should include "that" before "Rspack" for grammatical clarity. Consider revising to: "It is the ordered list of package.json fields that Rspack will try when resolving an npm package's entry point."
| Controls the priority of fields in a package.json used to locate a package's entry file. It is the ordered list of package.json fields Rspack will try when resolving an npm package's entry point. | |
| Controls the priority of fields in a package.json used to locate a package's entry file. It is the ordered list of package.json fields that Rspack will try when resolving an npm package's entry point. |
Summary
docs: add documentation for more resolve options
Related Links
Checklist