Skip to content

fix: lazy compilation port replacement#5470

Merged
chenjiahan merged 2 commits intomainfrom
lazy_port_replace_0623
Jun 23, 2025
Merged

fix: lazy compilation port replacement#5470
chenjiahan merged 2 commits intomainfrom
lazy_port_replace_0623

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • Moved the lazy compilation port placeholder replacement logic from devMiddlewares.ts to lazyCompilation.ts, ensuring it is applied consistently.
  • Re-enabled the previously skipped E2E test for verifying the replacement of the port placeholder with the actual port.

Checklist

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

Copilot AI review requested due to automatic review settings June 23, 2025 08:51
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 23, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit e694c89
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/685916601e942e00085e1c08
😎 Deploy Preview https://deploy-preview-5470--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 (🔴 down 6 from production)
Accessibility: 97 (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
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 centralizes the lazy compilation port-placeholder replacement into the lazyCompilation plugin and re-enables the corresponding E2E test.

  • Moved placeholder-replacement logic out of devMiddlewares.ts into lazyCompilation.ts
  • Updated pluginLazyCompilation to apply replacePortPlaceholder
  • Re-enabled the E2E test for port-placeholder replacement on non-Windows platforms

Reviewed Changes

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

File Description
packages/core/src/server/devMiddlewares.ts Removed inline port-replacement and cleaned up unused import
packages/core/src/plugins/lazyCompilation.ts Added replacePortPlaceholder logic when configuring serverUrl
e2e/cases/lazy-compilation/port-placeholder/index.test.ts Unskipped and updated test for port-placeholder behavior

Comment thread e2e/cases/lazy-compilation/port-placeholder/index.test.ts Outdated
@chenjiahan chenjiahan merged commit e8a76ff into main Jun 23, 2025
11 checks passed
@chenjiahan chenjiahan deleted the lazy_port_replace_0623 branch June 23, 2025 09:01
This was referenced Jun 23, 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