Skip to content

Commit a9564b9

Browse files
committedFeb 2, 2025··
feat!: drop cjs format
1 parent 0624e9f commit a9564b9

File tree

3 files changed

+246
-406
lines changed

3 files changed

+246
-406
lines changed
 

‎package.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
"module": "./dist/index.js",
2323
"types": "./dist/index.d.ts",
2424
"exports": {
25-
".": {
26-
"require": "./dist/index.cjs",
27-
"import": "./dist/index.js"
28-
},
25+
".": "./dist/index.js",
2926
"./package.json": "./package.json"
3027
},
3128
"publishConfig": {
@@ -34,8 +31,8 @@
3431
"scripts": {
3532
"lint": "eslint --cache .",
3633
"lint:fix": "pnpm run lint --fix",
37-
"build": "tsup",
38-
"dev": "tsup --watch",
34+
"build": "tsdown",
35+
"dev": "tsdown --watch",
3936
"test": "vitest",
4037
"typecheck": "tsc --noEmit",
4138
"format": "prettier --cache --write .",
@@ -73,7 +70,7 @@
7370
"prettier": "^3.4.2",
7471
"rolldown": "^1.0.0-beta.3",
7572
"rollup": "^4.34.0",
76-
"tsup": "^8.3.6",
73+
"tsdown": "^0.5.6",
7774
"tsx": "^4.19.2",
7875
"typescript": "^5.7.3",
7976
"vitest": "^3.0.4"

‎pnpm-lock.yaml

+240-394
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tsup.config.ts ‎tsdown.config.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import { defineConfig } from 'tsup'
1+
import { defineConfig } from 'tsdown'
22

33
export default defineConfig({
44
entry: ['./src/index.ts'],
5-
format: ['cjs', 'esm'],
5+
format: ['esm'],
66
target: 'node18.12',
7-
splitting: true,
8-
cjsInterop: true,
97
clean: true,
108
dts: true,
119
platform: 'node',
12-
removeNodeProtocol: false,
1310
})

0 commit comments

Comments
 (0)
Please sign in to comment.