Skip to content

docs: add documentation for more resolve options#1392

Merged
Timeless0911 merged 1 commit intomainfrom
docs/resolve
Dec 11, 2025
Merged

docs: add documentation for more resolve options#1392
Timeless0911 merged 1 commit intomainfrom
docs/resolve

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

Summary

docs: add documentation for more resolve options

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 11, 2025 09:45
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 11, 2025

Deploy Preview for rslib ready!

Name Link
🔨 Latest commit 3a2c5a8
🔍 Latest deploy log https://app.netlify.com/projects/rslib/deploys/693a929f440f8e000894335d
😎 Deploy Preview https://deploy-preview-1392--rslib.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Timeless0911 Timeless0911 merged commit e6282bf into main Dec 11, 2025
23 checks passed
@Timeless0911 Timeless0911 deleted the docs/resolve branch December 11, 2025 09:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.conditionNames to specify condition names for matching package exports field entry points
  • Added documentation for resolve.mainFields to control package.json field priority for entry file resolution
  • Updated resolve.aliasStrategy description for better clarity and cross-referencing
  • Fixed link format for outBase reference 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.
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Suggested change
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.

Copilot uses AI. Check for mistakes.

## 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.
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

Suggested change
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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants