Skip to content

Commit 686da44

Browse files
authored
refactor: move build format config to tsup config rather than hardcoding in commands (#138)
1 parent 844e2ec commit 686da44

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"access": "public"
2828
},
2929
"scripts": {
30-
"build": "tsup --format esm,cjs",
31-
"build:watch": "tsup --watch --format esm,cjs",
30+
"build": "tsup",
31+
"build:watch": "tsup --watch",
3232
"test": "vitest run",
3333
"test:watch": "vitest",
3434
"prepublishOnly": "npm run build"

tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { defineConfig } from 'tsup'
66

77
export default defineConfig({
88
entry: ['src/index.ts', 'src/index-workers.ts'],
9-
format: ['esm'],
9+
format: ['esm', 'cjs'],
1010
external: ['cloudflare:workers'],
1111
dts: true,
1212
sourcemap: true,

0 commit comments

Comments
 (0)