Skip to content

Commit 2266824

Browse files
authored
fix: update unbuild to 2.0.0, fix type declarations for ESM (#28)
* fix: update unbuild to 2.0.0, fix type declarations for ESM Fixes #24 * Make reserved names ES3 compliant
1 parent 70c78aa commit 2266824

File tree

3 files changed

+797
-818
lines changed

3 files changed

+797
-818
lines changed

build.config.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ export default defineBuildConfig({
44
entries: ['src/index'],
55
externals: ['vite'],
66
clean: true,
7-
declaration: true,
7+
declaration: 'compatible',
88
rollup: {
99
emitCJS: true,
10-
inlineDependencies: true
10+
inlineDependencies: true,
11+
output: {
12+
generatedCode: {
13+
reservedNamesAsProps: false
14+
}
15+
}
1116
}
1217
})

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"types": "./dist/index.d.ts",
1212
"exports": {
1313
".": {
14-
"types": "./dist/index.d.ts",
1514
"import": "./dist/index.mjs",
1615
"require": "./dist/index.cjs"
1716
}
@@ -48,7 +47,7 @@
4847
"prettier": "^2.8.8",
4948
"rollup": "^2.79.1",
5049
"semver": "^7.6.0",
51-
"unbuild": "^0.9.4",
50+
"unbuild": "^2.0.0",
5251
"vite": "^5.0.0",
5352
"vitest": "^0.34.6",
5453
"node-forge": "^1.3.1"

0 commit comments

Comments
 (0)