Skip to content

feat: improve lazy compilation options for single entry#5431

Merged
chenjiahan merged 1 commit intomainfrom
lazy_single_entry_0617
Jun 17, 2025
Merged

feat: improve lazy compilation options for single entry#5431
chenjiahan merged 1 commit intomainfrom
lazy_single_entry_0617

Conversation

@chenjiahan
Copy link
Member

Summary

If there is only one entry, do not enable lazy compilation for entries, this can reduce the rebuild time and provide better DX.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings June 17, 2025 06:34
@netlify
Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit cd6e590
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68510c781a046b000891b8a4
😎 Deploy Preview https://deploy-preview-5431--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: 74 (🔴 down 9 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 improves the lazy compilation options to optimize rebuild times when there is only a single entry. The changes include updating the documentation in both Chinese and English to describe the new behavior and modifying the core plugin to conditionally disable lazy compilation for entries in single-entry scenarios.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
website/docs/zh/config/dev/lazy-compilation.mdx Added a comment explaining that the entries option is disabled by default for a single entry.
website/docs/en/config/dev/lazy-compilation.mdx Added a similar comment in English to document the same behavior.
packages/core/src/plugins/lazyCompilation.ts Introduced a conditional check to disable lazy compilation for entries when there's one entry.
Comments suppressed due to low confidence (1)

packages/core/src/plugins/lazyCompilation.ts:19

  • [nitpick] Consider extending or explicitly documenting the handling of non-boolean truthy 'options' values if they are expected, to ensure clarity in the API's behavior.
if (options === true) {

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