Skip to content

Commit f9bf761

Browse files
committed
build: esm-only dist
1 parent 2194560 commit f9bf761

File tree

3 files changed

+330
-1176
lines changed

3 files changed

+330
-1176
lines changed

build.config.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import { defineBuildConfig } from "unbuild";
1+
import { defineBuildConfig } from "obuild/config";
22

33
export default defineBuildConfig({
4-
declaration: true,
5-
rollup: {
6-
emitCJS: true,
7-
inlineDependencies: true,
8-
},
4+
entries: ["src/index.ts"],
95
});

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@
66
"license": "MIT",
77
"sideEffects": false,
88
"exports": {
9-
".": {
10-
"require": "./dist/index.cjs",
11-
"import": "./dist/index.mjs",
12-
"types": "./dist/index.d.ts"
13-
}
9+
".": "./dist/index.mjs"
1410
},
15-
"main": "./dist/index.cjs",
16-
"types": "./dist/index.d.ts",
11+
"main": "./dist/index.mjs",
12+
"types": "./dist/index.d.mts",
1713
"files": [
1814
"dist"
1915
],
2016
"scripts": {
21-
"build": "unbuild",
17+
"build": "obuild",
2218
"dev": "vitest",
2319
"lint": "eslint . && prettier -c src test",
2420
"lint:fix": "eslint . --fix && prettier -w src test",
@@ -37,9 +33,9 @@
3733
"eslint": "^9.39.2",
3834
"eslint-config-unjs": "^0.6.2",
3935
"flat": "^6.0.1",
36+
"obuild": "^0.4.19",
4037
"prettier": "^3.8.1",
4138
"typescript": "^5.9.3",
42-
"unbuild": "^3.6.1",
4339
"vitest": "^4.0.18"
4440
},
4541
"packageManager": "pnpm@10.28.1"

0 commit comments

Comments
 (0)