full site update
This commit is contained in:
28
node_modules/astro/dist/assets/fonts/implementations/url-proxy-content-resolver.js
generated
vendored
Normal file
28
node_modules/astro/dist/assets/fonts/implementations/url-proxy-content-resolver.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
function createLocalUrlProxyContentResolver({
|
||||
errorHandler
|
||||
}) {
|
||||
return {
|
||||
resolve(url) {
|
||||
try {
|
||||
return url + readFileSync(url, "utf-8");
|
||||
} catch (cause) {
|
||||
throw errorHandler.handle({
|
||||
type: "unknown-fs-error",
|
||||
data: {},
|
||||
cause
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function createRemoteUrlProxyContentResolver() {
|
||||
return {
|
||||
// Passthrough, the remote provider URL is enough
|
||||
resolve: (url) => url
|
||||
};
|
||||
}
|
||||
export {
|
||||
createLocalUrlProxyContentResolver,
|
||||
createRemoteUrlProxyContentResolver
|
||||
};
|
Reference in New Issue
Block a user