mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-23 14:08:42 -05:00
2bfea919fe
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
24 lines
691 B
TypeScript
24 lines
691 B
TypeScript
import { resolve } from "path";
|
|
import { defineConfig } from "vite";
|
|
import dts from "vite-plugin-dts";
|
|
|
|
const config = () => {
|
|
return 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: "formbricksJsWrapper",
|
|
formats: ["es", "cjs"],
|
|
fileName: "index",
|
|
},
|
|
},
|
|
plugins: [dts({ rollupTypes: true, bundledPackages: ["@formbricks/js-core"] })],
|
|
});
|
|
};
|
|
|
|
export default config;
|