mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-24 03:21:20 -05:00
0f95f1c98c
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
30 lines
840 B
TypeScript
30 lines
840 B
TypeScript
import { resolve } from "path";
|
|
import { defineConfig } from "vite";
|
|
import dts from "vite-plugin-dts";
|
|
|
|
import webPackageJson from "../../apps/web/package.json";
|
|
|
|
const config = () => {
|
|
return defineConfig({
|
|
define: {
|
|
"import.meta.env.VERSION": JSON.stringify(webPackageJson.version),
|
|
},
|
|
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",
|
|
formats: ["es", "umd"],
|
|
// the proper extensions will be added
|
|
fileName: "index",
|
|
},
|
|
},
|
|
plugins: [dts({ rollupTypes: true })],
|
|
});
|
|
};
|
|
|
|
export default config;
|