Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/legacy-types-resolution.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`@policyengine/ui-kit/legacy` types now resolve correctly under TypeScript `bundler` resolution. Same root cause as 0.8.1's main-entry fix: `src/legacy/index.ts` re-exported `'./tokens'` and `'./charts'`, but Vite's multi-entry build emits `dist/legacy/tokens.js` and `dist/legacy/charts.js` siblings to the tsc-emitted `dist/legacy/tokens/index.d.ts` and `dist/legacy/charts/index.d.ts` folders. With both shapes on disk, TS's `bundler` resolver picks the file (no types) over the folder. Pinning to `'./tokens/index'` and `'./charts/index'` forces folder resolution.
9 changes: 7 additions & 2 deletions src/legacy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@
* This module will be removed in a future major release once consumers migrate.
*/

export * from "./tokens";
export * from "./charts";
// Subpath re-exports use explicit `/index` to dodge the same
// file-shadowing-folder ambiguity fixed in src/index.ts. Without the
// `/index` pin, TypeScript's `bundler` resolution picks the Vite-emitted
// `dist/legacy/tokens.js` over the tsc-emitted `dist/legacy/tokens/index.d.ts`
// and silently drops the re-exports.
export * from "./tokens/index";
export * from "./charts/index";