Update Hydration and HMR logic
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import allPagesBundler from "../bundler/all-pages-bundler";
|
||||
import serverPostBuildFn from "./server-post-build-fn";
|
||||
import { log } from "../../utils/log";
|
||||
import allPagesBunBundler from "../bundler/all-pages-bun-bundler";
|
||||
import cleanupArtifacts from "./cleanup-artifacts";
|
||||
|
||||
type Params = {
|
||||
target_file_paths?: string[];
|
||||
@@ -13,11 +14,15 @@ export default async function rebuildBundler(params?: Params) {
|
||||
// await global.BUNDLER_CTX?.dispose();
|
||||
// global.BUNDLER_CTX = undefined;
|
||||
|
||||
await allPagesBundler({
|
||||
const new_artifacts = await allPagesBunBundler({
|
||||
page_file_paths: params?.target_file_paths,
|
||||
});
|
||||
|
||||
await serverPostBuildFn();
|
||||
|
||||
if (new_artifacts?.[0]) {
|
||||
cleanupArtifacts({ new_artifacts });
|
||||
}
|
||||
} catch (error: any) {
|
||||
log.error(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user