Files
formbricks/packages/api/vite.config.js
Shubham Palriwala 0f95f1c98c feat: Revamp @formbricks/js package (#2299)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-03-28 10:32:08 +00:00

21 lines
617 B
JavaScript

import { resolve } from "path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
build: {
emptyOutDir: false, // keep the dist folder to avoid errors with pnpm go when folder is empty during build
minify: "terser",
sourcemap: true,
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, "src/index.ts"),
name: "formbricks-api",
formats: ["es", "umd"],
// the proper extensions will be added
fileName: "index",
},
},
plugins: [dts({ rollupTypes: true })],
});