Skip to content

Commit 4a22de6

Browse files
committedFeb 26, 2025
build!: esm-only dist
1 parent 8662c4e commit 4a22de6

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed
 

‎build.config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineBuildConfig } from "unbuild";
2+
import { rm } from "node:fs/promises";
3+
4+
export default defineBuildConfig({
5+
hooks: {
6+
async "build:done"() {
7+
await rm("dist/index.d.ts");
8+
await rm("dist/cli.d.ts");
9+
await rm("dist/cli.d.mts");
10+
},
11+
},
12+
});

‎package.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@
88
"type": "module",
99
"exports": {
1010
".": {
11-
"types": "./dist/index.d.ts",
12-
"import": "./dist/index.mjs",
13-
"require": "./dist/index.cjs"
11+
"types": "./dist/index.d.mts",
12+
"default": "./dist/index.mjs"
1413
}
1514
},
1615
"bin": {
1716
"changelogen": "./dist/cli.mjs"
1817
},
19-
"main": "./dist/index.cjs",
20-
"module": "./dist/index.mjs",
21-
"types": "./dist/index.d.ts",
18+
"types": "./dist/index.d.mts",
2219
"files": [
2320
"dist"
2421
],

0 commit comments

Comments
 (0)
Please sign in to comment.