Skip to content

Commit 1d99506

Browse files
committed
chore: fix types
1 parent 34a2e35 commit 1d99506

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/node/build.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ export async function build(cliOptions: Partial<ViteSSGOptions> = {}) {
121121
await Promise.all(
122122
routesPaths.map(async(route) => {
123123
try {
124-
const appCtx = await createApp(false, route)
124+
const appCtx = await createApp(false, route) as ViteSSGContext<true>
125125
const { app, router, head, initialState } = appCtx
126126

127127
if (router) {
128128
await router.push(route)
129129
await router.isReady()
130130
}
131131

132-
const transformedIndexHTML = (await onBeforePageRender?.(route, indexHTML, appCtx as ViteSSGContext<true>)) || indexHTML
132+
const transformedIndexHTML = (await onBeforePageRender?.(route, indexHTML, appCtx)) || indexHTML
133133

134134
const ctx: SSRContext = {}
135135
const appHTML = await renderToString(app, ctx)

src/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-use-before-define */
12
import type { App } from 'vue'
23
import type { Router, RouteRecordRaw, RouterOptions as VueRouterOptions } from 'vue-router'
34
import type { HeadClient } from '@vueuse/head'

0 commit comments

Comments
 (0)