Skip to content

Commit c7d3025

Browse files
committed
build!: esm-only dist
1 parent f440f42 commit c7d3025

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

build.config.ts

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

package.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,9 @@
77
"sideEffects": false,
88
"type": "module",
99
"exports": {
10-
".": {
11-
"types": "./dist/index.d.ts",
12-
"import": {
13-
"types": "./dist/index.d.mts",
14-
"default": "./dist/index.mjs"
15-
},
16-
"require": {
17-
"types": "./dist/index.d.cts",
18-
"default": "./dist/index.cjs"
19-
}
20-
}
10+
".": "./dist/index.mjs"
2111
},
22-
"main": "./dist/index.cjs",
23-
"module": "./dist/index.mjs",
24-
"types": "./dist/index.d.cts",
12+
"types": "./dist/index.d.mts",
2513
"files": [
2614
"dist"
2715
],

0 commit comments

Comments
 (0)