From f2e9b31951bda5436025fb25211bca93c961b5a9 Mon Sep 17 00:00:00 2001 From: satoshi toyama Date: Tue, 22 Oct 2024 15:38:35 +0900 Subject: [PATCH 1/3] update --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a974b91e..21349a4a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,4 @@ next-env.d.ts .env.sentry-build-plugin # prepare fonts programmatically -app/fonts/index.ts +app/fonts/ From 40bd279925ce66a8b9d42b816d2f64861796883a Mon Sep 17 00:00:00 2001 From: satoshi toyama Date: Tue, 22 Oct 2024 15:39:40 +0900 Subject: [PATCH 2/3] tweak --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 03ae41a0..c87c686a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "predev": "node prepare-font.js", + "predev": "bun prepare-font.js", "dev": "SENTRY_SUPPRESS_TURBOPACK_WARNING=1 next dev --turbo", "prebuild": "node prepare-font.js", "build": "next build", From 37e60881a273b602b2a475d91b7a1725d5a4f1e7 Mon Sep 17 00:00:00 2001 From: satoshi toyama Date: Tue, 22 Oct 2024 15:42:35 +0900 Subject: [PATCH 3/3] tweak --- prepare-font.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prepare-font.js b/prepare-font.js index 226c7d2b..5cea7f1e 100644 --- a/prepare-font.js +++ b/prepare-font.js @@ -21,8 +21,10 @@ const downloadFile = async (url, destination) => { (async () => { if ( - process.env.NODE_ENV === "production" && - process.env.VERCEL_ENV === "production" + // Check if the environment is production or force downloading fonts + (process.env.NODE_ENV === "production" && + process.env.VERCEL_ENV === "production") || + process.env.FORCE_DOWNLOAD_FONTS ) { const BLOB_URL = process.env.BLOB_URL;