Skip minify in debug builds

This commit is contained in:
Damien Elmes 2022-12-04 10:05:16 +10:00
parent f2ca87b1d8
commit ecfa557043
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ import { sassPlugin } from "esbuild-sass-plugin";
import sveltePlugin from "esbuild-svelte";
import { readFileSync, writeFileSync } from "fs";
import { basename } from "path";
import { argv } from "process";
import { argv, env } from "process";
import sveltePreprocess from "svelte-preprocess";
import { typescript } from "svelte-preprocess-esbuild";
@ -26,7 +26,7 @@ build({
entryPoints: [entrypoint],
globalName: "anki",
outfile: bundle_js,
minify: true,
minify: env.RELEASE && true,
loader: { ".svg": "text" },
preserveSymlinks: true,
sourcemap: false,

View file

@ -2,7 +2,7 @@
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { build } from "esbuild";
import { argv } from "process";
import { argv, env } from "process";
const [_node, _script, entrypoint, bundle_js] = argv;
@ -13,7 +13,7 @@ build({
bundle: true,
entryPoints: [entrypoint],
outfile: bundle_js,
minify: true,
minify: env.RELEASE && true,
preserveSymlinks: true,
target,
}).catch(() => process.exit(1));