Refactor SSR strategy. Redirect before bundling any page component. Additional bugfixes for dev environment

This commit is contained in:
2026-04-12 16:20:16 +01:00
parent 84d490b189
commit f0aae8a8fa
27 changed files with 210 additions and 87 deletions
@@ -31,12 +31,16 @@ export default async function grabPageErrorComponent({ error, routeParams, is404
}
const file_path = match.filePath;
const bundledMap = global.BUNDLER_CTX_MAP?.[file_path];
const { component, module, serverRes, root_module } = await grabPageModules({
const page_component = await grabPageModules({
file_path: file_path,
query: match?.query,
routeParams,
url,
});
if (page_component instanceof Response) {
return page_component;
}
const { component, module, serverRes, root_module } = page_component;
return {
component,
routeParams,