From 2cc7b99832edb6e82780981b6060aaef4774f2ff Mon Sep 17 00:00:00 2001 From: SoonIter Date: Wed, 25 Jun 2025 16:56:34 +0800 Subject: [PATCH] test(e2e): playwright support lazyCompilation after Rsbuild 1.4.0, remove RSPRESS_LAZY_COMPILATION=false --- e2e/utils/runCommands.ts | 2 -- packages/core/src/node/initRsbuild.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/e2e/utils/runCommands.ts b/e2e/utils/runCommands.ts index ac82b58af..522bdf1ab 100644 --- a/e2e/utils/runCommands.ts +++ b/e2e/utils/runCommands.ts @@ -95,8 +95,6 @@ export async function runDevCommand( appDir, env: { PORT: port.toString(), - // This is an escape hatch for playwright test, playwright does not support lazyCompilation - RSPRESS_LAZY_COMPILATION: 'false', }, }); } diff --git a/packages/core/src/node/initRsbuild.ts b/packages/core/src/node/initRsbuild.ts index 13903af1c..d41d7b298 100644 --- a/packages/core/src/node/initRsbuild.ts +++ b/packages/core/src/node/initRsbuild.ts @@ -172,7 +172,7 @@ async function createInternalBuildConfig( ...(base.length > 0 ? { base: removeTrailingSlash(base) } : {}), }, dev: { - lazyCompilation: process.env.RSPRESS_LAZY_COMPILATION !== 'false', // This is an escape hatch for playwright test, playwright does not support lazyCompilation + lazyCompilation: process.env.RSPRESS_LAZY_COMPILATION !== 'false', // This is an escape hatch // Serve static files setupMiddlewares: middlewares => { middlewares.unshift(serveSearchIndexMiddleware(config));