Core/vite.config.ts

32 lines
635 B
TypeScript
Raw Normal View History

2024-06-08 23:52:26 +02:00
import {ConfigEnv, defineConfig, UserConfig} from "vite";
import dts from "vite-plugin-dts";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
return ({
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: {
external: ["react", "react-dom", "react-router-dom", "@phosphor-icons/react"],
2024-06-08 23:52:26 +02:00
},
},
plugins: [
react(),
dts({
insertTypesEntry: true,
2024-07-14 22:21:51 +02:00
exclude: ["demo", "node_modules"],
2024-06-08 23:52:26 +02:00
}),
]
});
});