Files
buzz/packages/ui/vite.config.ts
Arjun Mahanti 6a672bd0fa fix(design-system): include notices only during production builds
Signed-off-by: Arjun Mahanti <arjun@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
2026-09-09 08:53:07 -07:00

33 lines
711 B
TypeScript

import { copyFileSync } from "node:fs";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [
{
name: "license-notices",
apply: "build",
closeBundle() {
copyFileSync("THIRD_PARTY_NOTICES.md", "dist/THIRD_PARTY_NOTICES.md");
copyFileSync("../../LICENSE", "dist/LICENSE");
},
},
],
build: {
lib: {
entry: "src/index.ts",
formats: ["es"],
fileName: "index",
cssFileName: "ui",
},
rollupOptions: {
external: [
/^react($|\/)/,
/^react-dom($|\/)/,
/^@base-ui\//,
/^lucide-react/,
/^@daypicker\//,
/^react-resizable-panels/,
],
},
},
});