aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/common.mjs
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-16 17:21:23 +0200
committerVendicated <vendicated@riseup.net>2022-10-16 17:21:23 +0200
commit20237f566474f01dbb7ea4054b64582c689699d3 (patch)
tree91bb391b6bff0d5d8b562aa461fcca494dc2c29b /scripts/build/common.mjs
parent01ae0983b378ca478e7b6891e183718e8c45ed02 (diff)
downloadVencord-20237f566474f01dbb7ea4054b64582c689699d3.tar.gz
Vencord-20237f566474f01dbb7ea4054b64582c689699d3.tar.bz2
Vencord-20237f566474f01dbb7ea4054b64582c689699d3.zip
watch: enable sourcemaps and disable minify
Diffstat (limited to 'scripts/build/common.mjs')
-rw-r--r--scripts/build/common.mjs9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs
index d9b2878..59153a6 100644
--- a/scripts/build/common.mjs
+++ b/scripts/build/common.mjs
@@ -2,10 +2,7 @@ import { execSync } from "child_process";
import esbuild from "esbuild";
import { readdir } from "fs/promises";
-/**
- * @type {esbuild.WatchMode|false}
- */
-export const watch = process.argv.includes("--watch");
+const watch = process.argv.includes("--watch");
/**
* @type {esbuild.BuildOptions}
@@ -13,7 +10,9 @@ export const watch = process.argv.includes("--watch");
export const commonOpts = {
logLevel: "info",
bundle: true,
- watch
+ watch,
+ minify: !watch,
+ sourcemap: watch ? "inline" : ""
};
// https://github.com/evanw/esbuild/issues/619#issuecomment-751995294