@@ -10,13 +10,6 @@ import type { Locator, Page } from "playwright";
1010import type { ViteDevServer } from "vite" ;
1111import { PROTOCOL_VERSION } from "../../../packages/gateway-protocol/src/version.js" ;
1212import { CONTROL_UI_BOOTSTRAP_CONFIG_PATH } from "../../../src/gateway/control-ui-contract.js" ;
13- import { controlUiLocaleModulesPlugin } from "../../config/control-ui-locales.ts" ;
14- import {
15- controlUiBrowserOnlySharedModuleAliases ,
16- resolveExternalPackageAliasesForVite ,
17- resolveSourcePackageAliasesForVite ,
18- resolveTsconfigPathAliasesForVite ,
19- } from "../../vite.config.ts" ;
2013import type { ControlUiBuildInfo } from "../build-info.ts" ;
2114
2215export function controlUiSessionPath ( sessionKey : string , basePath = "" ) : string {
@@ -313,7 +306,22 @@ export async function startControlUiE2eServer(
313306 buildId : "e2e" ,
314307 } ,
315308) : Promise < ControlUiE2eServer > {
316- const { createServer } = await import ( "vite" ) ;
309+ // Shared browser fixtures import this helper; load filesystem-bound Vite
310+ // configuration only when its Node-owned development server actually starts.
311+ const [
312+ { createServer } ,
313+ { controlUiLocaleModulesPlugin } ,
314+ {
315+ controlUiBrowserOnlySharedModuleAliases,
316+ resolveExternalPackageAliasesForVite,
317+ resolveSourcePackageAliasesForVite,
318+ resolveTsconfigPathAliasesForVite,
319+ } ,
320+ ] = await Promise . all ( [
321+ import ( "vite" ) ,
322+ import ( "../../config/control-ui-locales.ts" ) ,
323+ import ( "../../vite.config.ts" ) ,
324+ ] ) ;
317325 const repoRoot = resolveRepoRoot ( ) ;
318326 const uiRoot = path . join ( repoRoot , "ui" ) ;
319327 const port = await resolveAvailableLoopbackPort ( ) ;
0 commit comments