Skip to content

Commit 74acd6e

Browse files
committed
fix: generate TypeScript declarations for @xray/ui package
- Add tsconfig.build.json for declaration generation - Update build script to run tsc after vite build - Clear tsbuildinfo cache to ensure fresh emit
1 parent 6e2ae1d commit 74acd6e

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

packages/ui/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"#storybook/*": "./.storybook/*"
2424
},
2525
"scripts": {
26-
"build": "vite build",
26+
"build": "vite build && rm -f tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json",
2727
"clean": "rm -rf dist",
2828
"dev": "vite build --watch",
2929
"typecheck": "tsc --noEmit",
@@ -36,12 +36,6 @@
3636
"solid-js": "catalog:"
3737
},
3838
"devDependencies": {
39-
"typescript": "catalog:",
40-
"vite": "catalog:",
41-
"vite-plugin-solid": "^2.10.2",
42-
"storybook": "^10.1.9",
43-
"storybook-solidjs-vite": "^10.0.9",
44-
"playwright": "^1.57.0",
4539
"@chromatic-com/storybook": "^4.1.3",
4640
"@storybook/addon-a11y": "^10.1.9",
4741
"@storybook/addon-docs": "^10.1.9",
@@ -51,6 +45,12 @@
5145
"@storybook/builder-vite": "^10.1.9",
5246
"@vitest/browser": "^4.0.15",
5347
"@vitest/browser-playwright": "^4.0.15",
54-
"@vitest/coverage-v8": "^4.0.15"
48+
"@vitest/coverage-v8": "^4.0.15",
49+
"playwright": "^1.57.0",
50+
"storybook": "^10.1.9",
51+
"storybook-solidjs-vite": "^10.0.9",
52+
"typescript": "catalog:",
53+
"vite": "catalog:",
54+
"vite-plugin-solid": "^2.10.2"
5555
}
5656
}

packages/ui/tsconfig.build.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"composite": false,
5+
"declaration": true,
6+
"emitDeclarationOnly": true,
7+
"outDir": "./dist",
8+
"rootDir": "./src",
9+
},
10+
"include": ["src/**/*.ts", "src/**/*.tsx"],
11+
"exclude": [
12+
"node_modules",
13+
"dist",
14+
"**/*.stories.tsx",
15+
"**/*.test.ts",
16+
"**/*.test.tsx",
17+
],
18+
"references": [],
19+
}

0 commit comments

Comments
 (0)