Skip to content

feat: move experiments.lazyCompilation to configuration toplevel#11337

Merged
stormslowly merged 5 commits intomainfrom
chore/lazy-compilation-configuration
Aug 8, 2025
Merged

feat: move experiments.lazyCompilation to configuration toplevel#11337
stormslowly merged 5 commits intomainfrom
chore/lazy-compilation-configuration

Conversation

@GiveMe-A-Name
Copy link
Copy Markdown
Member

@GiveMe-A-Name GiveMe-A-Name commented Aug 8, 2025

Summary

This PR refactors the lazy compilation configuration by promoting lazyCompilation from an experimental feature experiments.lazyCompilation to a top-level configuration option. This change reflects the maturity and stability of the lazy compilation feature in Rspack.

Related links

Checklist

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

Copilot AI review requested due to automatic review settings August 8, 2025 03:31
@GiveMe-A-Name GiveMe-A-Name requested a review from hardfist as a code owner August 8, 2025 03:31
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Aug 8, 2025

This comment was marked as outdated.

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 8, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit 69cce92
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68959fbd9dc2020008448c09
😎 Deploy Preview https://deploy-preview-11337--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 8, 2025

📦 Binary Size-limit

Comparing 69cce92 to chore(ci): update test node matrix (#10871) by pshu

🙈 Size remains the same at 47.64MB

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Aug 8, 2025

CodSpeed Performance Report

Merging #11337 will not alter performance

Comparing chore/lazy-compilation-configuration (69cce92) with main (04fd2b6)

Summary

✅ 17 untouched benchmarks

@hardfist hardfist requested a review from Copilot August 8, 2025 06:12
@hardfist hardfist changed the title chore: move experiments.lazyCompilation to configuration toplevel feat: move experiments.lazyCompilation to configuration toplevel Aug 8, 2025
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Aug 8, 2025
Copy link
Copy Markdown
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 refactors the lazy compilation configuration by promoting lazyCompilation from an experimental feature (experiments.lazyCompilation) to a top-level configuration option, reflecting the feature's maturity and stability in Rspack.

  • Moves lazyCompilation from experiments.lazyCompilation to the top-level configuration
  • Updates documentation to reflect the new configuration location and deprecates the old path
  • Maintains backward compatibility by supporting both configuration paths with deprecation warnings

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/docs/zh/guide/features/lazy-compilation.mdx Updates Chinese documentation examples to use top-level lazyCompilation instead of experiments.lazyCompilation
website/docs/zh/config/lazy-compilation.mdx Creates new Chinese documentation page for the top-level lazyCompilation configuration
website/docs/zh/config/experiments.mdx Deprecates experiments.lazyCompilation section and redirects to new configuration
website/docs/zh/config/_meta.json Adds lazy-compilation to the configuration navigation
website/docs/en/guide/features/lazy-compilation.mdx Updates English documentation examples to use top-level lazyCompilation
website/docs/en/config/lazy-compilation.mdx Creates new English documentation page for the top-level lazyCompilation configuration
website/docs/en/config/experiments.mdx Deprecates experiments.lazyCompilation section and redirects to new configuration
website/docs/en/config/_meta.json Adds lazy-compilation to the English configuration navigation
packages/rspack/src/schema/config.ts Adds schema validation for top-level lazyCompilation option
packages/rspack/src/config/types.ts Adds type definitions for top-level lazyCompilation and deprecates experimental version
packages/rspack/src/config/normalization.ts Handles normalization of the new top-level lazyCompilation configuration
packages/rspack/src/config/defaults.ts Sets default values for top-level lazyCompilation option
packages/rspack/src/builtin-plugin/lazy-compilation/middleware.ts Updates middleware to support both old and new configuration paths with deprecation warnings
packages/rspack/etc/core.api.md Updates API documentation to reflect type changes
packages/rspack-test-tools/tests/legacy-test/MultiCompiler.test.js Updates test to use new top-level configuration
packages/rspack-test-tools/tests/snapshots/Defaults.test.js.snap Updates test snapshot to include new default configuration

@hardfist hardfist requested a review from chenjiahan August 8, 2025 06:21
GiveMe-A-Name and others added 2 commits August 8, 2025 14:56
Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
@GiveMe-A-Name GiveMe-A-Name requested a review from hardfist August 8, 2025 07:34
@stormslowly stormslowly enabled auto-merge (squash) August 8, 2025 07:42
@stormslowly stormslowly merged commit f0cf886 into main Aug 8, 2025
68 of 70 checks passed
@stormslowly stormslowly deleted the chore/lazy-compilation-configuration branch August 8, 2025 07:42
@chenjiahan
Copy link
Copy Markdown
Member

Should we stabilize rspack.experiments.lazyCompilationMiddleware too?

https://rspack.rs/guide/features/lazy-compilation#integrating-with-custom-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants