Core/vite.config.ts
Madeorsk 3cb2f1504c
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline was successful
Version 1.9.0 : Migrate to preact and update react-router.
2024-11-29 17:44:52 +01:00

32 lines
665 B
TypeScript

import {ConfigEnv, defineConfig, UserConfig} from "vite";
import dts from "vite-plugin-dts";
import preact from "@preact/preset-vite";
// https://vitejs.dev/config/
export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
return ({
build: {
outDir: "lib",
sourcemap: true,
minify: "esbuild",
lib: {
entry: "index.ts",
formats: ["es"],
fileName: "index",
},
rollupOptions: {
external: ["preact", "@preact/compat", "react-router-dom", "@phosphor-icons/react"],
},
},
plugins: [
preact(),
dts({
rollupTypes: true,
insertTypesEntry: true,
exclude: ["demo", "node_modules"],
}),
]
});
});