We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5611979 commit cd71cdbCopy full SHA for cd71cdb
1 file changed
esbuild.js
@@ -1,6 +1,7 @@
1
import pkg from "./package.json" with { type: "json" };
2
import esbuild from "esbuild";
3
4
+const watch = process.argv.includes("-w");
5
const date = new Date();
6
const banner = `/**
7
* ${pkg.name} v${pkg.version} build ${date.toDateString()}
@@ -22,14 +23,14 @@ const lib = {
22
23
const demo = {
24
entryPoints: ["./demo/src/index.ts"],
25
outdir: "./public/demo",
- minify: process.argv.includes("-m"),
26
logLevel: "info",
27
format: "iife",
28
target: "es6",
29
+ minify: !watch,
30
bundle: true
31
};
32
-if(process.argv.includes("-w")) {
33
+if(watch) {
34
35
const ctxDemo = await esbuild.context(demo);
36
await ctxDemo.watch();
0 commit comments