Skip to content

Conversation

@SyMind
Copy link
Member

@SyMind SyMind commented Sep 30, 2025

Summary

Adds documentation about how resolve.alias affects 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

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

Copilot AI review requested due to automatic review settings September 30, 2025 08:02
@github-actions github-actions bot added release: document release: document related release(mr only) team The issue/pr is created by the member of Rspack. labels Sep 30, 2025
Copy link
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 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.

@netlify
Copy link

netlify bot commented Sep 30, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit 36fa3b3
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68db9eb0c4a0e000082f4a85
😎 Deploy Preview https://deploy-preview-11799--rspack.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.

JSerFeng
JSerFeng previously approved these changes Sep 30, 2025
@chenjiahan chenjiahan changed the title docs: warning for alias docs: explain how resolve.alias affects package resolution Sep 30, 2025
chenjiahan
chenjiahan previously approved these changes Sep 30, 2025
@chenjiahan chenjiahan enabled auto-merge (squash) September 30, 2025 09:11
@chenjiahan chenjiahan merged commit 61eba72 into main Sep 30, 2025
25 checks passed
@chenjiahan chenjiahan deleted the warning-for-alias branch September 30, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: document release: document related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants