docs: clarify declaration entry resolution - #1792
Merged
Merged
Conversation
Deploying rslib with
|
| Latest commit: |
a348dbc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1caa36d8.rslib.pages.dev |
| Branch Preview URL: | https://david-docs-clarify-dts-alias.rslib.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Clarifies redirect.dts.extension documentation to explain how Rslib resolves declaration entries for directory-based paths (automatic /index probing vs. explicit package-metadata-based entries), in both English and Chinese docs.
Changes:
- Document that directory targets only probe for an
indexdeclaration file. - Clarify that
package.jsonmetadata (types,exports.types,typesVersions) is not used for directory targets unless the path points directly to the entry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| website/docs/zh/config/lib/redirect.mdx | Updates Chinese docs to clarify directory /index probing vs. package metadata resolution. |
| website/docs/en/config/lib/redirect.mdx | Updates English docs to clarify directory /index probing vs. package metadata resolution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
redirect.dts.extensiondocs currently imply that directory-based path mappings always need a concrete declaration entry, even though Rslib probes for anindexdeclaration file. This PR clarifies the/indexprobing behavior and when package metadata-based entries must be configured explicitly in both the English and Chinese docs.Checklist