mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
test(ui): defer control ui vite import
This commit is contained in:
@@ -5,7 +5,7 @@ import { createServer as createNetServer } from "node:net";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { Page } from "playwright";
|
||||
import { createServer, type ViteDevServer } from "vite";
|
||||
import type { ViteDevServer } from "vite";
|
||||
import { PROTOCOL_VERSION } from "../../../packages/gateway-protocol/src/version.js";
|
||||
import { CONTROL_UI_BOOTSTRAP_CONFIG_PATH } from "../../../src/gateway/control-ui-contract.js";
|
||||
import {
|
||||
@@ -123,6 +123,7 @@ export function canRunPlaywrightChromium(chromiumExecutablePath: string): boolea
|
||||
}
|
||||
|
||||
export async function startControlUiE2eServer(): Promise<ControlUiE2eServer> {
|
||||
const { createServer } = await import("vite");
|
||||
const repoRoot = resolveRepoRoot();
|
||||
const uiRoot = path.join(repoRoot, "ui");
|
||||
const port = await resolveAvailableLoopbackPort();
|
||||
|
||||
Reference in New Issue
Block a user