Refactor Server Paradigm.
This commit is contained in:
+7
-3
@@ -1,6 +1,7 @@
|
||||
import grabDirNames from "../../utils/grab-dir-names";
|
||||
import _ from "lodash";
|
||||
const { HYDRATION_DST_DIR_MAP_JSON_FILE } = grabDirNames();
|
||||
export default async function recordArtifacts({ artifacts }) {
|
||||
export default async function recordArtifacts({ artifacts, page_file_paths, }) {
|
||||
const artifacts_map = {};
|
||||
for (const artifact of artifacts) {
|
||||
if (artifact?.local_path) {
|
||||
@@ -8,7 +9,10 @@ export default async function recordArtifacts({ artifacts }) {
|
||||
}
|
||||
}
|
||||
if (global.BUNDLER_CTX_MAP) {
|
||||
global.BUNDLER_CTX_MAP = artifacts_map;
|
||||
global.BUNDLER_CTX_MAP = _.merge(global.BUNDLER_CTX_MAP, artifacts_map);
|
||||
}
|
||||
await Bun.write(HYDRATION_DST_DIR_MAP_JSON_FILE, JSON.stringify(artifacts_map, null, 4));
|
||||
// await Bun.write(
|
||||
// HYDRATION_DST_DIR_MAP_JSON_FILE,
|
||||
// JSON.stringify(artifacts_map, null, 4),
|
||||
// );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user