From d2893326d7c8600d8ea9962442b5ca9a45c7d47a Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Mon, 10 Feb 2025 09:18:44 -0600 Subject: [PATCH] Enable turbo for local development --- package.json | 2 +- src/site/font.ts | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 2e9a2012..aac7942b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "exif-photo-blog", "scripts": { - "dev": "next dev", + "dev": "next dev --turbo", "build": "next build", "start": "next start", "lint": "next lint", diff --git a/src/site/font.ts b/src/site/font.ts index 17b02ad8..81348fef 100644 --- a/src/site/font.ts +++ b/src/site/font.ts @@ -4,21 +4,11 @@ import { cwd } from 'process'; const FONT_FAMILY_IBM_PLEX_MONO = 'IBMPlexMono'; -const getFontData = async () => { - let data; - if (typeof fs !== 'undefined') { - data = fs.readFileSync(path.join( - cwd(), - '/public/fonts/IBMPlexMono-Medium.ttf', - )); - } else { - data = await fetch(new URL( - '/public/fonts/IBMPlexMono-Medium.ttf', - import.meta.url, - )).then(res => res.arrayBuffer()); - } - return data; -}; +const getFontData = async () => + fs.readFileSync(path.join( + cwd(), + '/public/fonts/IBMPlexMono-Medium.ttf', + )); export const getIBMPlexMonoMedium = () => getFontData() .then(data => ({