OpenHands/openhands-ui/vite.config.ts
sp.wack 127220dc39
chore(ui): npm package config (#9535)
Co-authored-by: Ray Myers <ray.myers@gmail.com>
2025-07-14 20:50:44 +04:00

35 lines
802 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { resolve } from "path";
import dts from "vite-plugin-dts";
export default defineConfig({
plugins: [
react(),
tailwindcss(),
dts({
insertTypesEntry: true,
exclude: ["**/*.stories.tsx"],
}),
],
build: {
lib: {
entry: resolve(__dirname, "index.ts"),
name: "OpenHandsUI",
formats: ["es"],
fileName: "index",
},
rollupOptions: {
external: ["react", "react-dom"], // Don't bundle these
output: {
globals: {
react: "React",
"react-dom": "ReactDOM",
},
},
},
cssCodeSplit: false, // Bundle all CSS into a single index.css file
},
});