2025-09-10 23:38:56 +02:00
|
|
|
import { type ConfigEnv, defineConfig, type UserConfig } from "vite";
|
2024-06-08 23:52:26 +02:00
|
|
|
import dts from "vite-plugin-dts";
|
|
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
|
|
|
|
export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
2025-09-10 23:38:56 +02:00
|
|
|
return {
|
2024-06-08 23:52:26 +02:00
|
|
|
build: {
|
|
|
|
outDir: "lib",
|
|
|
|
sourcemap: true,
|
2024-07-14 22:21:51 +02:00
|
|
|
minify: "esbuild",
|
2024-06-08 23:52:26 +02:00
|
|
|
lib: {
|
|
|
|
entry: "index.ts",
|
|
|
|
formats: ["es"],
|
|
|
|
fileName: "index",
|
|
|
|
},
|
|
|
|
rollupOptions: {
|
2025-09-10 23:38:56 +02:00
|
|
|
external: [
|
|
|
|
"react",
|
|
|
|
"react-dom",
|
|
|
|
"react-router-dom",
|
|
|
|
"@phosphor-icons/react",
|
|
|
|
],
|
2024-06-08 23:52:26 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
react(),
|
|
|
|
dts({
|
2024-09-29 00:09:30 +02:00
|
|
|
rollupTypes: true,
|
2024-06-08 23:52:26 +02:00
|
|
|
insertTypesEntry: true,
|
2024-07-14 22:21:51 +02:00
|
|
|
exclude: ["demo", "node_modules"],
|
2024-06-08 23:52:26 +02:00
|
|
|
}),
|
2025-09-10 23:38:56 +02:00
|
|
|
],
|
|
|
|
};
|
2024-06-08 23:52:26 +02:00
|
|
|
});
|