diff --git a/src/runner/browser-env/vite/server.ts b/src/runner/browser-env/vite/server.ts index 1a712cf7..ccccd821 100644 --- a/src/runner/browser-env/vite/server.ts +++ b/src/runner/browser-env/vite/server.ts @@ -13,7 +13,7 @@ import { plugin as generateIndexHtml } from "./plugins/generate-index-html"; import { Config } from "../../../config"; import { VITE_DEFAULT_CONFIG_ENV } from "./constants"; -import type { ViteDevServer, InlineConfig } from "vite"; +import type { ViteDevServer, UserConfig, InlineConfig } from "vite"; import type { BrowserTestRunEnvOptions } from "./types"; export class ViteServer { @@ -87,10 +87,10 @@ export class ViteServer { } const config = this._options.viteConfig; - let preparedConfig: InlineConfig; + let preparedConfig: UserConfig; if (_.isString(config)) { - preparedConfig = (await import(path.resolve(process.cwd(), config))).default as InlineConfig; + preparedConfig = (await import(path.resolve(process.cwd(), config))).default as UserConfig; } else if (_.isFunction(config)) { preparedConfig = await config(VITE_DEFAULT_CONFIG_ENV); } else { diff --git a/src/runner/browser-env/vite/types.ts b/src/runner/browser-env/vite/types.ts index 5b17cde2..948d1440 100644 --- a/src/runner/browser-env/vite/types.ts +++ b/src/runner/browser-env/vite/types.ts @@ -1,11 +1,11 @@ import { BROWSER_EVENT_PREFIX } from "./constants"; -import type { InlineConfig, ConfigEnv } from "vite"; +import type { UserConfig, ConfigEnv } from "vite"; import type { BrowserViteEvents, WorkerViteEvents, ViteBrowserEvents } from "./browser-modules/types"; export type { BrowserViteEvents, WorkerViteEvents } from "./browser-modules/types"; export interface BrowserTestRunEnvOptions { - viteConfig?: string | InlineConfig | ((env: ConfigEnv) => InlineConfig | Promise); + viteConfig?: string | UserConfig | ((env: ConfigEnv) => UserConfig | Promise); } export interface ClientViteEvents extends BrowserViteEvents, WorkerViteEvents {}