fix(scripts/build): declare variable before calling function

This commit is contained in:
PalmDevs 2025-06-15 18:01:30 +07:00
parent 5a085a46d4
commit a93249cdb2
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -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()