Replaces static entry map with programmatic generation from component and utility arrays. Removes stale src/index.ts entry, adds all 16 components and 6 utilities.
24 lines
746 B
TypeScript
24 lines
746 B
TypeScript
import { defineConfig } from "tsdown";
|
|
|
|
const components = [
|
|
"dialog", "separator", "toggle", "switch", "checkbox", "progress",
|
|
"text-field", "radio-group", "toggle-group", "collapsible", "accordion",
|
|
"alert-dialog", "tabs", "slider", "pagination", "drawer",
|
|
];
|
|
const utilities = [
|
|
"presence", "focus-trap", "scroll-lock", "dismiss", "portal", "visually-hidden",
|
|
];
|
|
|
|
const entry: Record<string, string> = {};
|
|
for (const c of components) entry[`${c}/index`] = `src/components/${c}/index.ts`;
|
|
for (const u of utilities) entry[`${u}/index`] = `src/utilities/${u}/index.ts`;
|
|
|
|
export default defineConfig({
|
|
entry,
|
|
format: ["esm", "cjs"],
|
|
dts: true,
|
|
clean: true,
|
|
sourcemap: true,
|
|
external: ["solid-js", "solid-js/web", "solid-js/store"],
|
|
});
|