chore: update to vite's hook filter (#3333)
Fixes https://github.com/denoland/fresh/issues/3331
This commit is contained in:
@@ -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;
|
||||
}`;
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user