From a93249cdb29549e9e51e43ab1eb12bc9606b3757 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Sun, 15 Jun 2025 18:01:30 +0700 Subject: [PATCH] fix(scripts/build): declare variable before calling function --- scripts/build.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build.ts b/scripts/build.ts index 07a234a..88ccd41 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -18,12 +18,12 @@ await rm(GeneratedAssetsDir, { recursive: true, force: true }) ) .catch() -// If this file is being run directly, build the project -if (main === import.meta.filename) build() - const Dev = process.argv.includes('--dev') || process.env.NODE_ENV === 'development' +// If this file is being run directly, build the project +if (main === import.meta.filename) build() + export default async function build(dev = Dev, log = true) { const start = performance.now()