Skip to content

Commit 06627ef

Browse files
committed
chore(3.0): simplify build scripts
1 parent 92d8ad5 commit 06627ef

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@
6262
"scripts": {
6363
"lint": "biome check --write",
6464
"check": "biome check",
65-
"build": "node scripts/build.js",
65+
"build": "pnpm run build:esm && pnpm run build:cjs",
66+
"build:esm": "tsc -p tsconfig.lib.json --outDir lib/esm",
67+
"build:cjs": "tsc -p tsconfig.lib.json --module CommonJS --moduleResolution Node --outDir lib/cjs",
68+
"postbuild:cjs": "echo '{\"type\": \"commonjs\"}' > lib/cjs/package.json",
6669
"prepublishOnly": "pnpm run build",
6770
"test": "vitest --run test/*.test.ts",
6871
"coverage": "vitest run --coverage",

scripts/build.js

-31
This file was deleted.

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"esModuleInterop": true,
88
"forceConsistentCasingInFileNames": true,
99
"incremental": true,
10-
"lib": ["ES2023", "DOM"],
10+
"lib": ["ES2024", "DOM"],
1111
"module": "NodeNext",
1212
"moduleResolution": "NodeNext",
1313
"noErrorTruncation": true,

0 commit comments

Comments
 (0)