Bugfix: Refactor SSR bundler. Fix stale cache SSR modules.
This commit is contained in:
Vendored
+7
-7
@@ -8,12 +8,12 @@ import watcherEsbuildCTX from "./server/watcher-esbuild-ctx";
|
||||
import allPagesESBuildContextBundler from "./bundler/all-pages-esbuild-context-bundler";
|
||||
import serverPostBuildFn from "./server/server-post-build-fn";
|
||||
import reactModulesBundler from "./bundler/react-modules-bundler";
|
||||
import initPages from "./bundler/init-pages";
|
||||
const dirNames = grabDirNames();
|
||||
const { PAGES_DIR } = dirNames;
|
||||
export default async function bunextInit() {
|
||||
global.HMR_CONTROLLERS = [];
|
||||
global.BUNDLER_CTX_MAP = {};
|
||||
global.SSR_BUNDLER_CTX_MAP = {};
|
||||
global.BUNDLER_REBUILDS = 0;
|
||||
global.PAGE_FILES = [];
|
||||
global.SKIPPED_BROWSER_MODULES = new Set();
|
||||
@@ -34,17 +34,17 @@ export default async function bunextInit() {
|
||||
await allPagesESBuildContextBundler({
|
||||
post_build_fn: serverPostBuildFn,
|
||||
});
|
||||
initPages({
|
||||
log_time: true,
|
||||
});
|
||||
// initPages({
|
||||
// log_time: true,
|
||||
// });
|
||||
watcherEsbuildCTX();
|
||||
}
|
||||
else {
|
||||
log.build(`Building Modules ...`);
|
||||
await allPagesESBuildContextBundler();
|
||||
initPages({
|
||||
log_time: true,
|
||||
});
|
||||
// initPages({
|
||||
// log_time: true,
|
||||
// });
|
||||
cron();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user