Skip to content

Commit bdb4b9f

Browse files
committed
chore: bundle using tsup
1 parent c44480a commit bdb4b9f

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"main": "build/index.js",
99
"type": "module",
1010
"files": [
11-
"build/src",
12-
"build/index.d.ts",
13-
"build/index.js"
11+
"build"
1412
],
1513
"exports": {
1614
".": "./build/index.js",
@@ -21,7 +19,7 @@
2119
"test": "c8 npm run quick:test",
2220
"clean": "del-cli build",
2321
"typecheck": "tsc --noEmit",
24-
"compile": "npm run lint && npm run clean && tsc",
22+
"compile": "npm run lint && npm run clean && tsup-node",
2523
"build": "npm run compile",
2624
"prepublishOnly": "npm run build",
2725
"lint": "eslint . --ext=.ts",
@@ -51,6 +49,7 @@
5149
"np": "^8.0.4",
5250
"prettier": "^3.0.0",
5351
"ts-node": "^10.9.1",
52+
"tsup": "^7.1.0",
5453
"typescript": "^5.1.6",
5554
"youch": "^3.2.3"
5655
},
@@ -106,5 +105,16 @@
106105
"exclude": [
107106
"tests/**"
108107
]
108+
},
109+
"tsup": {
110+
"entry": [
111+
"./index.ts",
112+
"./src/types.ts"
113+
],
114+
"outDir": "./build",
115+
"clean": true,
116+
"format": "esm",
117+
"dts": true,
118+
"target": "esnext"
109119
}
110120
}

0 commit comments

Comments
 (0)