Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

lazyCompilationMiddleware now supports lazy compilation when using multiple compiler.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings June 19, 2025 09:19
@netlify
Copy link

netlify bot commented Jun 19, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit d9fe593
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6853d62cdf45f60008273f12
😎 Deploy Preview https://deploy-preview-5446--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: 69 (🟢 up 11 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
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 updates lazyCompilationMiddleware to support lazy compilation for multi environments by removing the multi-compiler check.

  • Remove the conditional logic that extracted the first compiler from a multi-compiler; the middleware now directly receives the entire compiler.
  • Update the import statements accordingly.
Comments suppressed due to low confidence (2)

packages/core/src/server/devMiddlewares.ts:146

  • The removal of the multi-compiler check means that lazyCompilationMiddleware now receives the full compiler instance. Please verify that the middleware is designed to handle multi-compiler setups without extracting a specific compiler and update the documentation if needed.
      rspack.experiments.lazyCompilationMiddleware(compiler) as RequestHandler,

packages/core/src/server/devMiddlewares.ts:4

  • [nitpick] Since the isMultiCompiler function is no longer used, ensure that any related documentation or comments are updated to reflect that lazyCompilationMiddleware now directly accepts a multi-compiler instance.
import { pick } from '../helpers';

@chenjiahan chenjiahan merged commit bc0d1ac into main Jun 19, 2025
12 checks passed
@chenjiahan chenjiahan deleted the lazy_env_0619 branch June 19, 2025 10:40
This was referenced Jun 20, 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.

1 participant