Files
formbricks-formbricks/packages/react-native/vite.config.ts
ty kerr 89ffe99dcc feat: react native sdk (#2565)
Co-authored-by: tykerr <tykerr@gmail.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com>
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-08-23 12:43:49 +02:00

29 lines
730 B
TypeScript

import { resolve } from "node:path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
const config = () => {
return defineConfig({
optimizeDeps: {
exclude: ["react-native"],
},
build: {
emptyOutDir: false,
minify: "terser",
sourcemap: true,
rollupOptions: {
external: ["react", "react-native", "react-dom", "react-native-webview"],
},
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "formbricksReactNative",
formats: ["es", "cjs"],
fileName: "index",
},
},
plugins: [dts({ rollupTypes: true, bundledPackages: ["@formbricks/api", "@formbricks/types"] })],
});
};
export default config;