Skip to content

Commit bd710b1

Browse files
chore: build output with unbuild
1 parent 26b2ee3 commit bd710b1

File tree

3 files changed

+2155
-147
lines changed

3 files changed

+2155
-147
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+
3+
export default defineBuildConfig({
4+
entries: [
5+
'src/index',
6+
],
7+
declaration: true,
8+
clean: true,
9+
rollup: {
10+
emitCJS: true,
11+
},
12+
});

package.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,26 @@
2020
"eslint",
2121
"rxjs"
2222
],
23-
"main": "./dist/index.js",
23+
"sideEffects": false,
24+
"exports": {
25+
".": {
26+
"types": "./dist/index.d.ts",
27+
"import": "./dist/index.mjs",
28+
"require": "./dist/index.cjs"
29+
}
30+
},
31+
"main": "./dist/index.mjs",
32+
"module": "./dist/index.mjs",
33+
"types": "./dist/index.d.ts",
2434
"files": [
2535
"dist",
2636
"docs"
2737
],
2838
"scripts": {
29-
"dist": "echo \"todo\"",
39+
"build": "unbuild",
3040
"lint": "eslint",
31-
"test": "vitest"
41+
"test": "vitest",
42+
"typecheck": "tsc --noEmit"
3243
},
3344
"dependencies": {
3445
"@typescript-eslint/scope-manager": "^8.12.2",
@@ -58,6 +69,7 @@
5869
"rxjs": "^7.0.0",
5970
"typescript": "~5.6.3",
6071
"typescript-eslint": "^8.12.2",
72+
"unbuild": "^2.0.0",
6173
"vitest": "^2.1.4"
6274
},
6375
"engines": {

0 commit comments

Comments
 (0)