2024-10-04 16:28:03 +02:00
|
|
|
import {ConfigEnv, defineConfig, UserConfig} from "vite";
|
|
|
|
import dts from "vite-plugin-dts";
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
|
|
|
|
export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
|
|
|
return ({
|
|
|
|
build: {
|
|
|
|
outDir: "lib",
|
|
|
|
sourcemap: true,
|
|
|
|
minify: "esbuild",
|
|
|
|
lib: {
|
|
|
|
entry: "src/index.ts",
|
|
|
|
formats: ["es"],
|
|
|
|
fileName: "index",
|
|
|
|
},
|
2024-10-05 18:40:44 +02:00
|
|
|
rollupOptions: {
|
|
|
|
external: ["@sharkitek/core", "drizzle-orm"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
test: {
|
|
|
|
root: "./tests",
|
|
|
|
setupFiles: ["./tests/setup.ts"],
|
2024-10-04 16:28:03 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
dts({
|
|
|
|
insertTypesEntry: true,
|
|
|
|
rollupTypes: true,
|
|
|
|
exclude: ["node_modules"],
|
|
|
|
}),
|
|
|
|
]
|
|
|
|
});
|
|
|
|
});
|