feat: scaffold Astro + Tailwind project
This commit is contained in:
25
node_modules/astro/dist/assets/fonts/infra/ssr-runtime-font-file-url-resolver.js
generated
vendored
Normal file
25
node_modules/astro/dist/assets/fonts/infra/ssr-runtime-font-file-url-resolver.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { MissingGetFontFileRequestUrl } from "../../../core/errors/errors-data.js";
|
||||
import { AstroError } from "../../../core/errors/errors.js";
|
||||
class SsrRuntimeFontFileUrlResolver {
|
||||
#urls;
|
||||
constructor({
|
||||
urls
|
||||
}) {
|
||||
this.#urls = urls;
|
||||
}
|
||||
resolve(url, requestUrl) {
|
||||
if (!this.#urls.has(url)) {
|
||||
return null;
|
||||
}
|
||||
if (!url.startsWith("/")) {
|
||||
return url;
|
||||
}
|
||||
if (!requestUrl) {
|
||||
throw new AstroError(MissingGetFontFileRequestUrl);
|
||||
}
|
||||
return `${requestUrl.origin}${url}`;
|
||||
}
|
||||
}
|
||||
export {
|
||||
SsrRuntimeFontFileUrlResolver
|
||||
};
|
||||
Reference in New Issue
Block a user