chore: update to vite's hook filter (#3333)

Fixes https://github.com/denoland/fresh/issues/3331
This commit is contained in:
Marvin Hagemeister
2025-09-04 11:16:06 +02:00
committed by GitHub
parent baf774517b
commit b94aab2a1a
10 changed files with 432 additions and 418 deletions
+7 -4
View File
@@ -26,14 +26,17 @@ export function buildIdPlugin(): Plugin {
return `\0fresh/build-id`;
}
},
load(id) {
if (id !== `\0fresh/build-id`) return;
return `export let BUILD_ID = ${JSON.stringify(buildId)};
load: {
filter: {
id: /\0fresh\/build-id/,
},
handler() {
return `export let BUILD_ID = ${JSON.stringify(buildId)};
export const DENO_DEPLOYMENT_ID = undefined;
export function setBuildId(id) {
BUILD_ID = id;
}`;
},
},
};
}