import { defineConfig } from "tsup";

export default defineConfig({
  tsconfig: "tsconfig.lib.json",
  entry: {
    index: "src/index.ts",
    "styles/tailwind-preset": "src/styles/tailwind-preset.ts",
  },
  format: ["esm"],
  dts: true,
  sourcemap: true,
  clean: false,
  splitting: true,
  external: [
    "@codemirror/autocomplete",
    "@codemirror/commands",
    "@codemirror/lang-css",
    "@codemirror/lang-html",
    "@codemirror/lang-javascript",
    "@codemirror/lang-markdown",
    "@codemirror/language",
    "@codemirror/search",
    "@codemirror/state",
    "@codemirror/theme-one-dark",
    "@codemirror/view",
    "@hyperframes/core",
    "@hyperframes/player",
    "@hyperframes/sdk",
    "@phosphor-icons/react",
    "bpm-detective",
    "dompurify",
    "marked",
    "mediabunny",
    "react",
    "react-dom",
    "react/jsx-runtime",
    "zustand",
  ],
});
