Skip to content

Commit ec67518

Browse files
committed
Fix tsdown build
1 parent b6ea356 commit ec67518

5 files changed

Lines changed: 14 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ $RECYCLE.BIN/
204204
# .pnp.*
205205

206206
# Artifcats
207+
.tsbuild/
207208
dist/
208209
lib/
209210
testing/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
],
4848
"scripts": {
4949
"dev": "tsdown --watch",
50-
"build": "tsdown --format esm --format cjs",
50+
"build": "tsdown",
5151
"test": "vitest run",
5252
"test:watch": "vitest",
5353
"format": "prettier . --write --ignore-path .gitignore",

tsconfig.test.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"allowJs": true,
55
"esModuleInterop": true,
66
"checkJs": false,
7-
"types": ["node"]
7+
"types": ["node"],
8+
"outDir": ".tsbuild"
89
},
910
"include": ["tests/**/*.ts", "src/**/*.ts"]
1011
}

tsdown.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from 'tsdown';
2+
3+
export default defineConfig({
4+
format: ['esm', 'cjs'],
5+
dts: {
6+
build: true,
7+
},
8+
outDir: 'dist',
9+
});

vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ export default defineConfig({
44
test: {
55
pool: 'forks',
66
testTimeout: 10000,
7+
exclude: ['node_modules', '.tsbuild'],
78
},
89
});

0 commit comments

Comments
 (0)