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 => ({