fix merge errors

pull/3386/head
Yuxuan Zhang 2 years ago
parent cc101a7095
commit 2449ffc670
No known key found for this signature in database
GPG Key ID: 6910B04F3351EF7D

@ -53,7 +53,10 @@ export async function build(
} }
await task('rendering pages', async (updateProgress) => { await task('rendering pages', async (updateProgress) => {
const entryPath = pathToFileURL(path.join(siteConfig.tempDir, 'app.js')).toString() + '?t=' + Date.now() const entryPath =
pathToFileURL(path.join(siteConfig.tempDir, 'app.js')).toString() +
'?t=' +
Date.now()
const appChunk = const appChunk =
clientResult && clientResult &&
@ -126,7 +129,7 @@ export async function build(
await cluster(entryPath, context, pages, updateProgress) await cluster(entryPath, context, pages, updateProgress)
} else { } else {
let count_done = 0 let count_done = 0
const { render } = await import(pathToFileURL(entryPath).toString()) const { render } = await import(entryPath)
await pMap( await pMap(
pages, pages,
async (page) => { async (page) => {

@ -67,9 +67,8 @@ async function renderWorker() {
pageAlloc: TaskAllocator<string> pageAlloc: TaskAllocator<string>
context: RenderPageContext context: RenderPageContext
} = ctx.deserialize(workerData) } = ctx.deserialize(workerData)
const { pathToFileURL } = await import('url')
const { renderPage } = await import('./render') const { renderPage } = await import('./render')
const { render } = await import(pathToFileURL(entryPath).toString()) const { render } = await import(entryPath)
async function executor() { async function executor() {
while (true) { while (true) {
const page = await pageAlloc() const page = await pageAlloc()

Loading…
Cancel
Save