fix: resolve preload href warnings

This commit is contained in:
Devin Haska 2024-02-21 22:12:15 -08:00
parent 7a26fc3a9a
commit aa77e9bfb9
3 changed files with 10 additions and 7 deletions

View file

@ -1,19 +1,20 @@
const fonts = require("./fonts");
const { getFontUrl } = require("../../config/utils");
const fonts = require("../../config/design-tokens/fonts.json");
const preloads = [
{
as: "font",
href: fonts.display.weights.extraBold.url,
href: getFontUrl(fonts.display.weights.ExtraBold.path),
crossorigin: true,
},
{
as: "font",
href: fonts.display.weights.bold.url,
href: getFontUrl(fonts.display.weights.Bold.path),
crossorigin: true,
},
{
as: "font",
href: fonts.body.weights.regular.url,
href: getFontUrl(fonts.body.weights.Regular.path),
crossorigin: true,
},
];