Skip to content

Commit 162abd8

Browse files
committed
build!: esm-only dist
1 parent 43eaf8c commit 162abd8

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

build.config.ts

Lines changed: 12 additions & 0 deletions
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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
"sideEffects": false,
88
"type": "module",
99
"exports": {
10-
".": {
11-
"types": "./dist/index.d.ts",
12-
"import": "./dist/index.mjs",
13-
"require": "./dist/index.cjs"
14-
}
10+
"types": "./dist/index.d.mts",
11+
"default": "./dist/index.mjs"
1512
},
16-
"types": "./dist/index.d.ts",
13+
"types": "./dist/index.d.mts",
1714
"bin": {
1815
"automd": "dist/cli.mjs"
1916
},

0 commit comments

Comments
 (0)