From 2449ffc67009cec2d73ec422dcd927ce68c61059 Mon Sep 17 00:00:00 2001 From: Yuxuan Zhang Date: Tue, 2 Jan 2024 23:17:47 -0500 Subject: [PATCH] fix merge errors --- src/node/build/build.ts | 7 +++++-- src/node/build/render-worker.ts | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/node/build/build.ts b/src/node/build/build.ts index 8d42e732..924ff5f0 100644 --- a/src/node/build/build.ts +++ b/src/node/build/build.ts @@ -53,7 +53,10 @@ export async function build( } 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 = clientResult && @@ -126,7 +129,7 @@ export async function build( await cluster(entryPath, context, pages, updateProgress) } else { let count_done = 0 - const { render } = await import(pathToFileURL(entryPath).toString()) + const { render } = await import(entryPath) await pMap( pages, async (page) => { diff --git a/src/node/build/render-worker.ts b/src/node/build/render-worker.ts index 8f8c890d..48dfad13 100644 --- a/src/node/build/render-worker.ts +++ b/src/node/build/render-worker.ts @@ -67,9 +67,8 @@ async function renderWorker() { pageAlloc: TaskAllocator context: RenderPageContext } = ctx.deserialize(workerData) - const { pathToFileURL } = await import('url') const { renderPage } = await import('./render') - const { render } = await import(pathToFileURL(entryPath).toString()) + const { render } = await import(entryPath) async function executor() { while (true) { const page = await pageAlloc()