import { defineConfig } from 'tsup'; // Dual ESM + CJS emit with .d.ts for the main entry and the two // framework subpath exports. React and Svelte are peer deps — kept // external so the lib never bundles a framework copy. export default defineConfig({ entry: { index: 'src/index.ts', 'react/index': 'src/react/index.ts', 'svelte/index': 'src/svelte/index.ts' }, format: ['esm', 'cjs'], dts: true, clean: true, sourcemap: true, treeshake: true, external: ['react', 'svelte', 'svelte/store'] });