-
-
Notifications
You must be signed in to change notification settings - Fork 746
docs: explain how resolve.alias affects package resolution
#11799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 adds documentation warnings in both English and Chinese about the risks of using alias to directly point to packages in monorepo or node_modules. The warning explains how this practice can break normal module resolution logic and provides better alternatives.
- Added warning sections explaining why alias shouldn't directly target monorepo or node_modules packages
- Documented the technical consequences of bypassing package resolution mechanisms
- Provided recommendations to use package manager workspace features instead
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| website/docs/zh/config/resolve.mdx | Added Chinese warning documentation about alias misuse |
| website/docs/en/config/resolve.mdx | Added English warning documentation about alias misuse |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
400dab2 to
04e8cd8
Compare
04e8cd8 to
e9b6c25
Compare
e9b6c25 to
91b0d0a
Compare
f4e4404 to
f4d2c17
Compare
resolve.alias affects package resolution
Summary
Adds documentation about how
resolve.aliasaffects package resolution, clarify the difference between default package resolution and aliased paths, especially in monorepo scenarios, and recommend best practices for maintaining standard package resolution behavior.Related links
web-infra-dev/rsbuild#5311
Checklist