Refactor artifacts to use relative directory for build step and retrieval

This commit is contained in:
2026-09-23 05:08:54 +01:00
parent 2803dfa0be
commit 2335c60cc3
26 changed files with 117 additions and 204 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import grabRelativePath from "../../utils/grab-relative-path";
function removeController(controller) {
const idx = global.BUNEXT_HMR_CONTROLLERS.findIndex((c) => c.controller == controller);
if (typeof idx == "number" && idx >= 0) {
@@ -19,7 +20,7 @@ export default async function ({ req }) {
}
const match = global.BUNEXT_ROUTER.match(referer_url.pathname);
const target_map = match?.filePath
? global.BUNEXT_BUNDLER_CTX_MAP?.[match.filePath]
? global.BUNEXT_BUNDLER_CTX_MAP?.[grabRelativePath(match.filePath)]
: undefined;
let controller;
let heartbeat;