feat: improve lazy compilation options for single entry#5431
Merged
chenjiahan merged 1 commit intomainfrom Jun 17, 2025
Merged
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2 tasks
Contributor
There was a problem hiding this comment.
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) {
This was referenced Jun 19, 2025
Merged
Merged
This was referenced Aug 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
{ entries: false }for better DX rspress#2286Checklist