Skip to content

Conversation

GiveMe-A-Name
Copy link
Member

Summary

Related Links

Checklist

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

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 07:52
@GiveMe-A-Name GiveMe-A-Name marked this pull request as draft August 21, 2025 07:52
Copy link

netlify bot commented Aug 21, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit ef1b76f
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68ac0b05ed0ac000085bb21e
😎 Deploy Preview https://deploy-preview-5905--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: 65 (🔴 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
Contributor

@Copilot 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 enables lazy compilation by default in Rsbuild's development mode, changing from the previous configuration that only enabled imports but not entries. The change affects how modules are compiled during development, requiring extensive test updates to accommodate the new lazy loading behavior.

  • Changed default lazy compilation configuration from selective (imports only) to full enablement
  • Updated numerous E2E tests to wait for lazy-loaded content before assertions
  • Added explicit lazy compilation disabling for specific tests that rely on immediate compilation

Reviewed Changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/defaultConfig.ts Changed default lazy compilation from object config to true
e2e/cases/tailwindcss/hmr/index.test.ts Added wait for DOM content before CSS assertions
e2e/cases/syntax/using-declaration/index.test.ts Added wait for global variable before evaluation
e2e/cases/sri/enable-dev/src/index.js Added global variable for test synchronization
e2e/cases/sri/enable-dev/index.test.ts Added wait for global variable before assertions
e2e/cases/source/pre-entry/index.test.ts Skipped test due to lazy compilation ordering issues
e2e/cases/server/ssr/rsbuild.config.ts Explicitly disabled lazy compilation for SSR
e2e/cases/server/ssr/index.test.ts Added lazy compilation disable in test config
e2e/cases/server/public-dir-with-template/index.test.ts Added wait for DOM element before assertions
e2e/cases/server/public-dir-with-multi-template/index.test.ts Changed DOM queries to wait for elements
e2e/cases/server/proxy/project1/src/index.js Added global variable for test synchronization
e2e/cases/server/proxy/index.test.ts Added wait for global variable before assertions
e2e/cases/server/history-api-fallback/src/App.jsx Added ID to DOM element for better test targeting
e2e/cases/server/history-api-fallback/historyApiFallback.test.ts Updated selectors and added waits for lazy content
e2e/cases/plugin-stylus/raw-query/index.test.ts Added wait for multiple global variables
e2e/cases/plugin-stylus/inline-query/index.test.ts Added wait for multiple global variables
e2e/cases/plugin-sass/raw-query/index.test.ts Added wait for multiple global variables
e2e/cases/plugin-sass/inline-query/index.test.ts Added wait for multiple global variables
e2e/cases/plugin-less/raw-query/index.test.ts Added wait for global variables
e2e/cases/plugin-less/inline-query/index.test.ts Added wait for global variables
e2e/cases/plugin-api/plugin-hooks/src/index.js Added global variable for test synchronization
e2e/cases/plugin-api/plugin-hooks/index.test.ts Added wait and updated expected hook sequence
e2e/cases/plugin-api/plugin-hooks-environment/src/index.js Added global variable for test synchronization
e2e/cases/plugin-api/plugin-hooks-environment/index.test.ts Added wait and updated expected hook sequences
e2e/cases/output/source-map/index.test.ts Updated to handle async chunk source maps
e2e/cases/output/manifest-environment/index.test.ts Updated expected file count for lazy chunks
e2e/cases/output/inline-chunk/index.test.ts Updated CSS selectors for lazy-generated filenames
e2e/cases/output/charset/index.test.ts Updated file path expectations for async chunks
e2e/cases/mode/basic/index.test.ts Updated file matching patterns for lazy chunks
e2e/cases/minify/js-minify-always/src/index.js Changed console.log to global variable assignment
e2e/cases/minify/js-minify-always/index.test.ts Updated test for new global variable and file patterns
e2e/cases/minify/css-minify/index.test.ts Added wait for CSS requests
e2e/cases/minify/css-minify-inherit/index.test.ts Updated CSS file paths for async chunks
e2e/cases/live-reload/index.test.ts Disabled lazy compilation for live reload test
e2e/cases/hmr/error-recovery/src/App.tsx Modified test content
e2e/cases/hmr/error-recovery/index.test.ts Skipped test due to HMR issues with lazy compilation
e2e/cases/css/raw-query/index.test.ts Added wait for global variables
e2e/cases/css/lightningcss-prefixes/index.test.ts Updated CSS file path for async chunks
e2e/cases/css/inline-query/index.test.ts Added wait for global variables
e2e/cases/css/export-type-string/index.test.ts Added wait for global variable
e2e/cases/css/css-layers/index.test.ts Added wait for CSS requests
e2e/cases/cli/reload-env/index.test.ts Skipped test and updated file path
e2e/cases/assets/raw-query/index.test.ts Added waits for global variables across multiple tests

@@ -51,6 +51,9 @@ rspackOnlyTest(
rsbuildConfig: {
dev: {
liveReload: false,
// in this test, we disable hmr and liveReload,
// but lazyCompilation dependent hmr or liveReload to load lazy js bundle
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment has grammatical errors. It should be 'but lazyCompilation depends on HMR or liveReload to load lazy JS bundles' (fix 'dependent' to 'depends on', capitalize 'HMR' and 'JS').

Suggested change
// but lazyCompilation dependent hmr or liveReload to load lazy js bundle
// but lazyCompilation depends on HMR or liveReload to load lazy JS bundles

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant