Skip to content

fix: failed to resolve Rsbuild client modules#6674

Merged
chenjiahan merged 3 commits intomainfrom
hmr_client_modules_1201
Dec 1, 2025
Merged

fix: failed to resolve Rsbuild client modules#6674
chenjiahan merged 3 commits intomainfrom
hmr_client_modules_1201

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Dec 1, 2025

Summary

Fix failed to resolve Rsbuild client modules if @rsbuild/core is not installed in the project root.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings December 1, 2025 03:26
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 1, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit dacca93
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/692d11eb6fe9670008ce8e42
😎 Deploy Preview https://deploy-preview-6674--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🟢 up 6 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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 fixes the resolution of Rsbuild client modules (hmr and overlay) when @rsbuild/core is not installed in the project root. Instead of using package imports like @rsbuild/core/client/hmr, the code now uses filesystem paths via the new CLIENT_PATH constant.

Key Changes

  • Added CLIENT_PATH constant that resolves to the physical location of client modules in the dist folder
  • Updated HMR entry injection to use filesystem paths instead of package imports

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/constants.ts Adds CLIENT_PATH constant pointing to client modules location
packages/core/src/server/assets-middleware/index.ts Updates HMR entry generation to use CLIENT_PATH instead of package imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 61af857 into main Dec 1, 2025
11 checks passed
@chenjiahan chenjiahan deleted the hmr_client_modules_1201 branch December 1, 2025 04:12
@chenjiahan chenjiahan mentioned this pull request Dec 1, 2025
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.

2 participants