Skip to content

Commit fd34313

Browse files
committed
Reintroduce ESM build
1 parent cbf3025 commit fd34313

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

package.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,25 @@
1717
"url": "https://opencollective.com/express"
1818
},
1919
"license": "MIT",
20-
"exports": "./dist/index.js",
21-
"main": "dist/index.js",
22-
"typings": "dist/index.d.ts",
20+
"exports": {
21+
"import": {
22+
"types": "./dist/index.d.mts",
23+
"import": "./dist/index.mjs"
24+
},
25+
"require": {
26+
"types": "./dist/index.d.ts",
27+
"require": "./dist/index.js"
28+
}
29+
},
30+
"main": "./dist/index.js",
31+
"module": "./dist/index.mjs",
32+
"types": "./dist/index.d.ts",
2333
"files": [
2434
"dist/"
2535
],
2636
"scripts": {
2737
"bench": "vitest bench",
28-
"build": "ts-scripts build",
38+
"build": "tsdown src/index.ts --format cjs,esm --platform neutral --sourcemap",
2939
"format": "ts-scripts format",
3040
"lint": "ts-scripts lint",
3141
"prepare": "ts-scripts install && npm run build",
@@ -41,6 +51,7 @@
4151
"@vitest/coverage-v8": "^3.0.5",
4252
"recheck": "^4.5.0",
4353
"size-limit": "^11.1.2",
54+
"tsdown": "^0.21.7",
4455
"typescript": "^5.7.3",
4556
"vitest": "^3.0.5"
4657
},
@@ -56,9 +67,6 @@
5667
"ts-scripts": {
5768
"dist": [
5869
"dist"
59-
],
60-
"project": [
61-
"tsconfig.build.json"
6270
]
6371
}
6472
}

tsconfig.build.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)