test(e2e): add more case for lazy compilation#4888
Merged
chenjiahan merged 2 commits intomainfrom Mar 27, 2025
Merged
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds new end-to-end test cases for lazy compilation, covering both dynamic imports and basic page rendering, and updates the configuration to enable lazy compilation in development mode.
- Added an E2E test for dynamic import lazy compilation.
- Updated the basic lazy compilation test to include log polling.
- Added a new initial-chunk test and a corresponding configuration file.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| e2e/cases/lazy-compilation/dynamic-import/index.test.ts | New test to verify that dynamic imported modules are lazily compiled. |
| e2e/cases/lazy-compilation/dynamic-import/rsbuild.config.ts | Config update to enable lazy compilation. |
| e2e/cases/lazy-compilation/dynamic-import/src/index.js | Example entry module using dynamic import. |
| e2e/cases/lazy-compilation/basic/index.test.ts | Updated test with log polling for lazy compilation of pages. |
| e2e/cases/lazy-compilation/dynamic-import/src/foo.js | Added module for testing dynamic import. |
| e2e/cases/lazy-compilation/add-initial-chunk/index.test.ts | Simplified test for validating new initial chunk creation. |
Files not reviewed (1)
- website/docs/en/config/dev/lazy-compilation.mdx: Language not supported
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
Add more E2E case for lazy compilation.
Related Links
#4881
Checklist