Skip to content

Commit 920c70e

Browse files
committed
fix(client): exclude dist directory from TypeScript compilation to prevent TS6305 errors (#313)
Adds 'exclude: ["dist"]' to tsconfig.json and tsconfig.spec.json to prevent intermittent test failures caused by stale declaration files in the dist directory. Previously, when dist/ contained .d.ts files from previous builds, Vitest's typecheck would fail with TS6305 errors about files not being built from source. This happened because TypeScript was including both source files and generated declaration files in compilation. Fixes the 'sometimes it works, sometimes it doesn't' behavior when running pnpm nx test client.
1 parent 24926ff commit 920c70e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

pkgs/client/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {},
44
"files": [],
55
"include": ["src/**/*"],
6+
"exclude": ["dist"],
67
"references": [
78
{
89
"path": "../dsl"

pkgs/client/tsconfig.spec.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"src/**/*.spec.jsx",
2626
"src/**/*.d.ts"
2727
],
28+
"exclude": ["dist"],
2829
"references": [
2930
{
3031
"path": "./tsconfig.lib.json"

0 commit comments

Comments
 (0)