Skip to content

Commit

Permalink
common build options
Browse files Browse the repository at this point in the history
  • Loading branch information
femshima committed Oct 21, 2023
1 parent e84a62a commit b54adea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { build } from "esbuild";
import packageJson from "./package.json" assert { type: "json" };

await build({
entryPoints: ["src/main.ts"],
const buildOptions = {
bundle: true,
outfile: "dist/main.js",
platform: "node",
format: "esm",
external: Object.keys(packageJson.dependencies),
minify: true,
}

await build({
...buildOptions,
entryPoints: ["src/main.ts"],
outfile: "dist/main.js",
});

await build({
...buildOptions,
entryPoints: ["src/synthesis/task.ts"],
bundle: true,
outfile: "dist/task.js",
platform: "node",
format: "esm",
external: Object.keys(packageJson.dependencies),
minify: true,
});

0 comments on commit b54adea

Please sign in to comment.