From 9abb1045b27db98be209e0737e3e817ed7c38409 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 13 Jun 2023 14:34:10 +0100 Subject: [PATCH] Make sure Google lighthouse can tell we're using `font-display: swap` --- scripts/copy-npm-contrib.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/copy-npm-contrib.sh b/scripts/copy-npm-contrib.sh index ff3e002..fcf0a5d 100755 --- a/scripts/copy-npm-contrib.sh +++ b/scripts/copy-npm-contrib.sh @@ -22,3 +22,6 @@ mkcontrib fira-code node_modules/@fontsource/fira-code/latin.css mkcontrib fira-code/files node_modules/@fontsource/fira-code/files/fira-code-latin-* mkcontrib htmx node_modules/htmx.org/dist/{htmx.min.js,ext} mkcontrib glightbox node_modules/glightbox/dist/css/glightbox.min.css + +# HACK: Make sure Google lighthouse can tell we're using `font-display: swap` +find $CONTRIB_DIR/fira-code -type f -exec sed -i 's/var(--fontsource-display, swap)/swap/g' {} \;