Skip to content

Commit 91c3472

Browse files
Fix CJS build
1 parent 70f6b37 commit 91c3472

3 files changed

Lines changed: 394 additions & 30 deletions

File tree

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"codegen": "tsx src/codegen/codegen.ts",
2626
"build": "pnpm run codegen && pnpm run build:esm && pnpm run build:cjs",
2727
"build:esm": "tsc -p tsconfig.build.json",
28-
"build:cjs": "tsc -p tsconfig.build.cjs.json",
28+
"build:cjs": "rm -rf build/cjs && mkdir -p build/cjs && esbuild src/index.ts --bundle --platform=node --format=cjs --external:zod --outfile=build/cjs/index.cjs && dts-bundle-generator -o build/cjs/index.d.cts --project tsconfig.build.json build/esm/index.d.ts",
2929
"typecheck": "tsc --noEmit",
3030
"lint": "eslint .",
3131
"lint:fix": "eslint . --fix",
@@ -39,6 +39,8 @@
3939
"@eslint/js": "^9.39.1",
4040
"@types/json-schema": "^7.0.15",
4141
"@types/node": "^25.7.0",
42+
"dts-bundle-generator": "^9.5.1",
43+
"esbuild": "^0.28.0",
4244
"eslint": "^9.39.1",
4345
"tsx": "^4.19.0",
4446
"typescript": "^5.3.3",

0 commit comments

Comments
 (0)