mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
38 lines
830 B
TypeScript
38 lines
830 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: {
|
|
index: resolve(__dirname, "index.ts"),
|
|
tokens: resolve(__dirname, "tokens.css"),
|
|
},
|
|
name: "OpenHandsUI",
|
|
formats: ["es"],
|
|
fileName: "index",
|
|
},
|
|
rollupOptions: {
|
|
external: ["react", "react-dom"], // Don't bundle these
|
|
output: {
|
|
globals: {
|
|
react: "React",
|
|
"react-dom": "ReactDOM",
|
|
},
|
|
},
|
|
},
|
|
cssCodeSplit: true,
|
|
},
|
|
});
|