Skip to content

Commit

Permalink
docs(changeset): prerender
Browse files Browse the repository at this point in the history
  • Loading branch information
nksaraf committed Dec 11, 2023
1 parent 0f9a5df commit e6205a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/rotten-trees-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vinxi": patch
---

prerender
4 changes: 3 additions & 1 deletion packages/vinxi/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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 });
Expand Down
4 changes: 2 additions & 2 deletions packages/vinxi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e6205a4

Please sign in to comment.