fix: argv undefined

This commit is contained in:
TresAbhi committed 2023-08-10 19:14:43 +00:00
1 parent 9e2f9526fb
commit 70e4cbaba2
1 file changed
+4 -4
+4 -4
View File
@@ -2,10 +2,10 @@ import { BuildOptions, build } from 'esbuild';
import { copyFile, mkdirSync, rmSync } from 'fs';
import { argv } from 'process';
const isProd = !argv.includes('--dev');
const buildAll = argv.includes('--build=all');
const buildBot = argv.includes('--build=bot') || buildAll;
const buildServer = argv.includes('--build=server') || buildAll;
const isProd = argv === undefined || !argv.includes('--dev');
const buildAll = argv === undefined || argv.includes('--build=all');
const buildBot = argv?.includes('--build=bot') || buildAll;
const buildServer = argv?.includes('--build=server') || buildAll;
if (isProd) {
// only remove in production to ensure no time is wasted in dev