From bb1f5dfda779d7b29127be0d51e11607a63942a8 Mon Sep 17 00:00:00 2001 From: Arturo Silva Date: Fri, 28 Jun 2024 11:13:57 -0400 Subject: [PATCH] feat: switch to font display swap (#641) --- build.washingtonpost.com/next.config.js | 4 ++ build.washingtonpost.com/package.json | 2 +- build.washingtonpost.com/pages/_document.js | 37 ----------- build.washingtonpost.com/pages/font-faces.js | 54 ++++++++++++++++ build.washingtonpost.com/tsconfig.json | 6 +- package-lock.json | 20 +++++- packages/kit/package.json | 2 +- packages/kit/src/theme/stitches.config.ts | 65 ++++++++++++++++++-- packages/kit/src/theme/tokens.ts | 2 +- packages/kit/src/theme/wpds.tokens.json | 8 +-- 10 files changed, 147 insertions(+), 53 deletions(-) create mode 100644 build.washingtonpost.com/pages/font-faces.js diff --git a/build.washingtonpost.com/next.config.js b/build.washingtonpost.com/next.config.js index 8e5ec1b9d..e67c89ead 100644 --- a/build.washingtonpost.com/next.config.js +++ b/build.washingtonpost.com/next.config.js @@ -105,4 +105,8 @@ module.exports = withBundleAnalyzer({ env: { APP_ENV: "production", }, + transpilePackages: [ + "@washingtonpost/wpds-ui-kit", + "@washingtonpost/wpds-kitchen-sink", + ], }); diff --git a/build.washingtonpost.com/package.json b/build.washingtonpost.com/package.json index d6ba24224..d95bfc1b3 100644 --- a/build.washingtonpost.com/package.json +++ b/build.washingtonpost.com/package.json @@ -21,7 +21,7 @@ "@radix-ui/react-checkbox": "^1.0.0", "@radix-ui/react-collapsible": "^1.0.0", "@radix-ui/react-toggle-group": "^1.0.1", - "@stitches/react": "1.2.8", + "@stitches/react": "1.3.1-1", "@washingtonpost/front-end-utils": "0.5.17-alpha.1", "@washingtonpost/site-favicons": "0.3.4-alpha.1", "@washingtonpost/site-footer": "0.25.3-alpha.1", diff --git a/build.washingtonpost.com/pages/_document.js b/build.washingtonpost.com/pages/_document.js index bad66211d..b2d613f8e 100644 --- a/build.washingtonpost.com/pages/_document.js +++ b/build.washingtonpost.com/pages/_document.js @@ -42,43 +42,6 @@ export default function Document() { type="font/woff2" crossOrigin="anonymous" /> -