This commit is contained in:
2026-03-23 07:42:00 +01:00
parent 567fb4f746
commit 4b8b610e32
43 changed files with 635 additions and 169 deletions
+14
View File
@@ -0,0 +1,14 @@
import grabDirNames from "../../utils/grab-dir-names";
const { HYDRATION_DST_DIR_MAP_JSON_FILE } = grabDirNames();
export default async function recordArtifacts({ artifacts }) {
const artifacts_map = {};
for (const artifact of artifacts) {
if (artifact?.local_path) {
artifacts_map[artifact.local_path] = artifact;
}
}
if (global.BUNDLER_CTX_MAP) {
global.BUNDLER_CTX_MAP = artifacts_map;
}
await Bun.write(HYDRATION_DST_DIR_MAP_JSON_FILE, JSON.stringify(artifacts_map, null, 4));
}