Skip to content

Commit 6c9007c

Browse files
committed
fix(vite): pass correct root config in builder
1 parent d2e6490 commit 6c9007c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎src/build/vite/build.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ export async function viteBuild(nitro: Nitro) {
66
if (nitro.options.dev) {
77
throw new Error("Nitro dev CLI does not supports vite. Please use `vite dev` instead.");
88
}
9-
const { createBuilder } = await import((nitro.options as any).__vitePkg__ || "vite");
9+
const { createBuilder } = (await import(
10+
(nitro.options as any).__vitePkg__ || "vite"
11+
)) as typeof import("vite");
12+
1013
const pluginInstance = nitroPlugin({ _nitro: nitro });
1114
(globalThis as any).__nitro_build__ = true;
1215
const builder = await createBuilder({
13-
base: nitro.options.rootDir,
16+
root: nitro.options.rootDir,
1417
plugins: [pluginInstance],
1518
logLevel: isTest ? "warn" : undefined,
1619
});

0 commit comments

Comments
 (0)