Fix build lags
This commit is contained in:
@@ -22,6 +22,15 @@ export default async function handleWebPages({ req, }) {
|
||||
return new Response(existing_cache, res_opts);
|
||||
}
|
||||
}
|
||||
// The dev server port opens before the one-time startup build
|
||||
// finishes. First page render waits for it so we never serve HTML
|
||||
// against half-built hydration/SSR modules.
|
||||
if (is_dev && global.BUNEXT_INITIAL_BUILD_PROMISE) {
|
||||
try {
|
||||
await global.BUNEXT_INITIAL_BUILD_PROMISE;
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
const componentRes = await grabPageComponent({
|
||||
req,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user