Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions packages/vinext/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* needed for most Next.js apps.
*/

import vinext, { clientOutputConfig, clientTreeshakeConfig } from "./index.js";
import vinext, { getClientBuildOptions, getViteMajorVersion } from "./index.js";
import { printBuildReport } from "./build/report.js";
import { runPrerender } from "./build/run-prerender.js";
import path from "node:path";
Expand Down Expand Up @@ -362,6 +362,7 @@ async function buildApp() {
console.log(`\n vinext build (Vite ${getViteVersion()})\n`);

const isApp = hasAppDir();
const viteMajorVersion = getViteMajorVersion();
// In verbose mode, skip the custom logger so raw Vite/Rollup output is shown.
const logger = parsed.verbose
? vite.createLogger("info", { allowClearScreen: false })
Expand Down Expand Up @@ -465,11 +466,9 @@ async function buildApp() {
outDir: "dist/client",
manifest: true,
ssrManifest: true,
rollupOptions: {
input: "virtual:vinext-client-entry",
output: clientOutputConfig,
treeshake: clientTreeshakeConfig,
},
...getClientBuildOptions(viteMajorVersion, {
index: "virtual:vinext-client-entry",
}),
},
},
logger,
Expand Down
Loading
Loading