-
Notifications
You must be signed in to change notification settings - Fork 397
feat: support resolve.alias #7261
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
Merged
Merged
Conversation
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
🦋 Changeset detectedLatest commit: 6c6997d The changes in this PR will be included in the next version bump. This PR includes changesets to release 295 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for modernjs-byted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9aoy
previously approved these changes
Jun 24, 2025
e00ffa3 to
6c6997d
Compare
yimingjfe
approved these changes
Jun 26, 2025
3 tasks
Merged
This was referenced Aug 27, 2025
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.

This PR resolve the
resolve.aliaswarning,and also update the internal alias usage in Modern.js.1. Add support for
resolve.aliasconfigurationresolvefield (withresolve.alias) in various configs such asUniBuilderConfig,AppToolsUserConfig, andUserConfig. Users are now encouraged to useresolve.aliasinstead of the legacysource.alias.2. Plugin and toolchain adaptation
source.aliastoresolve.alias.source.aliasandresolve.aliasfor compatibility.3. Compatibility handling
source.aliasaliasis an empty object, it will be removed automatically to avoid warnings in the new Rsbuild version.transformNormalizedConfignow includes theresolvefield to ensure a smooth migration.4. Integration tests
resolve.aliasconfiguration, including config files, source code references, and actual runtime behavior.这个 PR 处理了
resolve.alias的警告问题,并更新了内部对别名的用法。1. 新增
resolve.alias配置支持UniBuilderConfig、AppToolsUserConfig、UserConfig等)中引入了resolve字段,并支持resolve.alias配置,推荐用户使用resolve.alias替代原有的source.alias。2. 插件与工具链适配
alias配置的插件(如 runtime、router、state、testing、express、koa 等)均已从source.alias切换为resolve.alias。alias传递逻辑已适配新结构,兼容source.alias和resolve.alias的合并。3. 兼容性处理
source.alias的兼容alias为空对象,则自动移除,避免新版 Rsbuild 警告。transformNormalizedConfig等 legacy 逻辑已补充resolve字段,确保平滑迁移。4. 集成测试用例
resolve.alias配置生效,包括配置文件、源码引用和实际运行效果。