diff --git a/.changeset/rotten-trees-begin.md b/.changeset/rotten-trees-begin.md new file mode 100644 index 00000000..ecd4496b --- /dev/null +++ b/.changeset/rotten-trees-begin.md @@ -0,0 +1,5 @@ +--- +"vinxi": patch +--- + +prerender diff --git a/packages/vinxi/lib/build.js b/packages/vinxi/lib/build.js index 4faee37a..fc10548a 100644 --- a/packages/vinxi/lib/build.js +++ b/packages/vinxi/lib/build.js @@ -2,7 +2,7 @@ import boxen from "boxen"; import { mkdir, rm, writeFile } from "fs/promises"; import { H3Event, createApp } from "h3"; import { createRequire } from "module"; -import { build, copyPublicAssets, createNitro } from "nitropack"; +import { build, copyPublicAssets, createNitro, prerender } from "nitropack"; import { writeFileSync } from "node:fs"; import { pathToFileURL } from "node:url"; @@ -89,6 +89,7 @@ export async function createBuild(app, buildConfig) { "node-fetch-native/polyfill", ), "unstorage/drivers/fs-lite": require.resolve("unstorage/drivers/fs-lite"), + "unstorage/drivers/fs": require.resolve("unstorage/drivers/fs"), defu: require.resolve("defu"), pathe: require.resolve("pathe"), unstorage: require.resolve("unstorage"), @@ -300,6 +301,7 @@ export async function createBuild(app, buildConfig) { await app.hooks.callHook("app:build:nitro:assets:copy:end", { app, nitro }); await mkdir(join(nitro.options.output.serverDir), { recursive: true }); + await prerender(nitro); await app.hooks.callHook("app:build:nitro:start", { app, nitro }); await build(nitro); await app.hooks.callHook("app:build:nitro:end", { app, nitro }); diff --git a/packages/vinxi/package.json b/packages/vinxi/package.json index 4d64c3d6..289d6936 100644 --- a/packages/vinxi/package.json +++ b/packages/vinxi/package.json @@ -152,12 +152,12 @@ "fast-glob": "^3.3.1", "get-port": "^6.1.2", "get-port-please": "^3.1.1", - "h3": "1.8.0", + "h3": "1.9.0", "hookable": "^5.5.3", "http-proxy": "^1.18.1", "micromatch": "^4.0.5", "mri": "^1.2.0", - "nitropack": "2.6.1", + "nitropack": "2.8.1", "node-fetch-native": "^1.4.0", "path-to-regexp": "^6.2.1", "pathe": "^1.1.1",