fix: adapt to vite fix of ssr build asset paths

pull/114/head
Evan You 4 years ago
parent af4b015864
commit 6b3fbe31a3

@ -16,7 +16,7 @@ export async function renderPage(
pageToHashMap: Record<string, string>,
hashMapStirng: string
) {
const { createApp } = require(path.join(config.tempDir, 'app.js'))
const { createApp } = require(path.join(config.tempDir, `_assets/app.js`))
const { app, router } = createApp()
const routePath = `/${page.replace(/\.md$/, '')}`
const siteData = resolveSiteDataByRoute(config.site, routePath)
@ -35,6 +35,7 @@ export async function renderPage(
// resolve page data so we can render head tags
const { __pageData } = require(path.join(
config.tempDir,
`_assets`,
pageServerJsFileName
))
const pageData = JSON.parse(__pageData)

Loading…
Cancel
Save