Skip to content

Commit 669cb9b

Browse files
authored
Build with unbuild (#11)
1 parent 42dac49 commit 669cb9b

File tree

6 files changed

+1483
-83
lines changed

6 files changed

+1483
-83
lines changed

.changeset/five-laws-compare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"html-aria": patch
3+
---
4+
5+
Build with unbuild

build.config.js

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: ['./src/index.ts'],
5+
clean: true,
6+
outDir: './dist/',
7+
declaration: 'compatible',
8+
sourcemap: true,
9+
rollup: {
10+
emitCJS: true,
11+
},
12+
});

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
"type": "git",
1919
"url": "git+https://github.com/drwpow/html-aria.git"
2020
},
21-
"main": "./dist/index.js",
21+
"main": "./dist/index.mjs",
2222
"exports": {
2323
".": {
2424
"import": {
2525
"types": "./dist/index.d.ts",
26-
"default": "./dist/index.js"
26+
"default": "./dist/index.mjs"
2727
},
2828
"require": {
2929
"types": "./dist/index.d.ts",
3030
"default": "./dist/index.cjs"
3131
},
32-
"default": "./dist/index.js"
32+
"default": "./dist/index.mjs"
3333
},
34-
"./*": "./dist/*.js",
34+
"./*": "./dist/*.mjs",
3535
"./package.json": "./package.json"
3636
},
3737
"author": {
@@ -40,7 +40,7 @@
4040
},
4141
"scripts": {
4242
"benchmark": "vitest bench",
43-
"build": "rollup -c",
43+
"build": "unbuild",
4444
"format": "biome format . --write",
4545
"lint": "biome check .",
4646
"test": "vitest run",
@@ -50,15 +50,11 @@
5050
"@biomejs/biome": "^1.9.4",
5151
"@changesets/changelog-github": "^0.5.0",
5252
"@changesets/cli": "^2.27.11",
53-
"@rollup/plugin-commonjs": "^28.0.2",
54-
"@rollup/plugin-typescript": "^12.1.2",
5553
"@types/aria-query": "^5.0.4",
5654
"aria-query": "^5.3.2",
5755
"jsdom": "^25.0.1",
58-
"rollup": "^4.30.0",
59-
"rollup-plugin-cleandir": "^3.0.0",
60-
"tslib": "^2.8.1",
6156
"typescript": "^5.7.2",
57+
"unbuild": "^3.2.0",
6258
"vitest": "^2.1.8"
6359
}
6460
}

0 commit comments

Comments
 (0)