mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
35 lines
899 B
TypeScript
35 lines
899 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: {
|
|
rollupOptions: {
|
|
output: { inlineDynamicImports: true },
|
|
},
|
|
emptyOutDir: false, // keep the dist folder to avoid errors with pnpm go when folder is empty during build
|
|
minify: "terser",
|
|
sourcemap: true,
|
|
lib: {
|
|
entry: resolve(__dirname, "src/website/index.ts"),
|
|
name: "formbricks",
|
|
formats: ["umd"],
|
|
fileName: "website",
|
|
},
|
|
},
|
|
plugins: [
|
|
dts({
|
|
rollupTypes: true,
|
|
bundledPackages: ["@formbricks/api", "@formbricks/types"],
|
|
}),
|
|
],
|
|
});
|
|
};
|
|
|
|
export default config;
|