From bcd8c8b4ae3f1f7117ff33eb15c07e80b874b50a Mon Sep 17 00:00:00 2001 From: LingyuCoder Date: Thu, 15 Jan 2026 10:39:15 +0800 Subject: [PATCH] feat: remove exports.experiments.lazyCompilationMiddleware --- packages/rspack/etc/core.api.md | 2 -- packages/rspack/src/exports.ts | 5 ----- website/docs/en/guide/features/lazy-compilation.mdx | 4 ---- website/docs/zh/guide/features/lazy-compilation.mdx | 4 ---- 4 files changed, 15 deletions(-) diff --git a/packages/rspack/etc/core.api.md b/packages/rspack/etc/core.api.md index 66105177cde2..e2ff6327f339 100644 --- a/packages/rspack/etc/core.api.md +++ b/packages/rspack/etc/core.api.md @@ -2466,8 +2466,6 @@ interface Experiments_2 { register: (filter: string, layer: 'logger' | 'perfetto', output: string) => Promise; cleanup: () => Promise; }; - // @deprecated (undocumented) - lazyCompilationMiddleware: typeof lazyCompilationMiddleware; // (undocumented) RemoveDuplicateModulesPlugin: typeof RemoveDuplicateModulesPlugin; // (undocumented) diff --git a/packages/rspack/src/exports.ts b/packages/rspack/src/exports.ts index 5b8a542b5f6e..b48508213551 100644 --- a/packages/rspack/src/exports.ts +++ b/packages/rspack/src/exports.ts @@ -381,10 +381,6 @@ interface Experiments { RsdoctorPlugin: typeof RsdoctorPlugin; RstestPlugin: typeof RstestPlugin; RslibPlugin: typeof RslibPlugin; - /** - * @deprecated Use `rspack.lazyCompilationMiddleware` instead - */ - lazyCompilationMiddleware: typeof lazyCompilationMiddleware; swc: { transform: typeof transform; minify: typeof minify; @@ -436,7 +432,6 @@ export const experiments: Experiments = { * @internal */ RslibPlugin, - lazyCompilationMiddleware, swc: { minify, transform, diff --git a/website/docs/en/guide/features/lazy-compilation.mdx b/website/docs/en/guide/features/lazy-compilation.mdx index e2e3e5285f7d..d3d6f3fe275b 100644 --- a/website/docs/en/guide/features/lazy-compilation.mdx +++ b/website/docs/en/guide/features/lazy-compilation.mdx @@ -120,10 +120,6 @@ server.start(); - `compiler`: The current [Compiler](/api/javascript-api/compiler) instance, use `lazyCompilation` config from it. -:::tip -Prior to Rspack 1.7, this middleware was only available via `rspack.experiments.lazyCompilationMiddleware`. -::: - ## Customizing lazy compilation endpoint By default, the lazy compilation middleware uses the `/lazy-compilation-using-` prefix for handling requests. If you need to customize this prefix, you can use the `prefix` option: diff --git a/website/docs/zh/guide/features/lazy-compilation.mdx b/website/docs/zh/guide/features/lazy-compilation.mdx index 4f128c9f2be5..a10cf68ce37a 100644 --- a/website/docs/zh/guide/features/lazy-compilation.mdx +++ b/website/docs/zh/guide/features/lazy-compilation.mdx @@ -122,10 +122,6 @@ server.start(); - `compiler`: 当前的 [Compiler](/api/javascript-api/compiler),使用该 Compiler 对应的 `lazyCompilation` 配置。 -:::tip -在 Rspack 1.7 版本之前,该中间件需要通过 `rspack.experiments.lazyCompilationMiddleware` 来获取。 -::: - ## 自定义懒编译端点 默认情况下,懒编译中间件使用 `/lazy-compilation-using-` 前缀来处理请求。如果你需要自定义这个前缀,可以使用 `prefix` 选项: