vblog
Viewing readonly version: 33View latest version
Script
9
1
2
3
4
5
6
7
export async function importFile(path: string) {
const res = await fetch(path, { redirect: "follow" });
if (!res.ok) return null;
return await res.text();
}
// REF
// const resp = await fetch(import.meta.resolve("./foo.css"), {redirect: "follow"});