Bugfix: Refactor SSR bundler. Fix stale cache SSR modules.

This commit is contained in:
2026-04-09 23:50:58 +01:00
parent 40fc7778a8
commit 7fb1784b95
28 changed files with 434 additions and 85 deletions
-8
View File
@@ -1,10 +1,6 @@
import _ from "lodash";
import grabPageComponent from "./web-pages/grab-page-component";
import initPages from "../bundler/init-pages";
export default async function serverPostBuildFn() {
// if (!global.IS_FIRST_BUNDLE_READY) {
// global.IS_FIRST_BUNDLE_READY = true;
// }
if (!global.HMR_CONTROLLERS?.[0] || !global.BUNDLER_CTX_MAP) {
return;
}
@@ -45,9 +41,5 @@ export default async function serverPostBuildFn() {
catch {
global.HMR_CONTROLLERS.splice(i, 1);
}
global.REACT_DOM_MODULE_CACHE.delete(target_artifact.local_path);
initPages({
target_page_file: target_artifact.local_path,
});
}
}