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/ 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", 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;