Skip to content

Commit dbba1ab

Browse files
authored
fix build:runner to bundle parts engine (#259)
* fix build:runner to bundle parts engine * format
1 parent 02c0ae7 commit dbba1ab

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build:worker-wrapper": "tsup-node ./lib/worker.ts --format esm --sourcemap inline --dts -d dist",
1111
"build:webworker:analyze": "tsup ./webworker/entrypoint.ts --platform browser --metafile ./metadata.json --format esm --sourcemap inline -d dist/webworker",
1212
"build:blob-url": "bun run ./scripts/build-worker-blob-url.ts",
13-
"build:runner": "tsup-node ./lib/runner --format esm --dts --platform browser -d dist/eval",
13+
"build:runner": "tsup-node --config tsup-runner.config.ts",
1414
"start:browser-test-server": "bun --port 3070 ./browser-tests/browsertest.html",
1515
"format": "biome format --write .",
1616
"format:check": "biome format .",

tsup-runner.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "tsup"
2+
3+
export default defineConfig({
4+
entry: ["./lib/runner/index.ts"], // Assuming index.ts is the entrypoint within the runner directory
5+
format: ["esm"],
6+
platform: "browser",
7+
sourcemap: "inline", // Added for consistency
8+
outDir: "dist/eval",
9+
noExternal: ["@tscircuit/parts-engine"],
10+
clean: true, // Added for consistency
11+
dts: true,
12+
})

tsup-webworker.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ export default defineConfig({
66
platform: "browser",
77
sourcemap: "inline",
88
outDir: "dist/webworker",
9-
noExternal: ["@tscircuit/core", "circuit-json", "jscad-fiber"],
9+
noExternal: [
10+
"@tscircuit/core",
11+
"circuit-json",
12+
"jscad-fiber",
13+
"@tscircuit/parts-engine",
14+
],
1015
clean: true,
1116
dts: true,
1217
})

0 commit comments

Comments
 (0)