Skip to content

Commit 42b57b0

Browse files
committed
build!: esm-only dist
1 parent 5d0a84e commit 42b57b0

File tree

3 files changed

+333
-1178
lines changed

3 files changed

+333
-1178
lines changed

build.config.ts

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

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

package.json

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,22 @@
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+
".": "./dist/index.mjs"
1511
},
16-
"main": "./dist/index.cjs",
17-
"module": "./dist/index.mjs",
18-
"types": "./dist/index.d.ts",
12+
"types": "./dist/index.d.mts",
1913
"files": [
2014
"dist"
2115
],
2216
"scripts": {
23-
"build": "unbuild",
17+
"build": "obuild",
2418
"dev": "vitest dev",
2519
"lint": "eslint --cache . && prettier -c src test",
2620
"lint:fix": "eslint --cache . --fix && prettier -c src test -w",
2721
"prepack": "pnpm run build",
2822
"play": "jiti ./playground/cli.ts",
29-
"release": "pnpm test && changelogen --release --push && npm publish",
30-
"test": "pnpm lint && vitest run --coverage"
23+
"release": "pnpm test && pnpm build && changelogen --release --push && npm publish",
24+
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
25+
"test:types": "tsc --noEmit"
3126
},
3227
"dependencies": {
3328
"consola": "^3.4.2"
@@ -40,11 +35,11 @@
4035
"eslint": "^9.39.2",
4136
"eslint-config-unjs": "^0.6.2",
4237
"jiti": "^2.6.1",
38+
"obuild": "^0.4.18",
4339
"prettier": "^3.8.0",
4440
"scule": "^1.3.0",
4541
"typescript": "^5.9.3",
46-
"unbuild": "^3.6.1",
4742
"vitest": "^4.0.17"
4843
},
4944
"packageManager": "[email protected]"
50-
}
45+
}

0 commit comments

Comments
 (0)