Keycloak
1import react from "@vitejs/plugin-react-swc";
2import path from "node:path";
3import peerDepsExternal from "rollup-plugin-peer-deps-external";
4import { defineConfig } from "vite";
5import { checker } from "vite-plugin-checker";
6import dts from "vite-plugin-dts";
7import { libInjectCss } from "vite-plugin-lib-inject-css";
8
9// https://vitejs.dev/config/
10export default defineConfig({
11build: {
12target: "esnext",
13lib: {
14entry: path.resolve(__dirname, "src/main.ts"),
15formats: ["es"],
16},
17rollupOptions: {
18plugins: [
19peerDepsExternal({
20includeDependencies: true,
21}),
22],
23},
24},
25plugins: [
26react(),
27libInjectCss(),
28checker({ typescript: true }),
29dts({ insertTypesEntry: true }),
30],
31});
32