Skip to content

Commit

Permalink
fix: adapt to vite fix of ssr build asset paths
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 2, 2020
1 parent af4b015 commit 6b3fbe3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node/build/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 6b3fbe3

Please sign in to comment.