anything-llm/embedded-app/vite.config.js

31 lines
757 B
JavaScript
Raw Normal View History

2024-01-25 02:20:26 +01:00
// vite.config.js
2024-01-31 18:23:08 +01:00
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import image from "@rollup/plugin-image"
2024-01-25 02:20:26 +01:00
export default defineConfig({
2024-01-31 18:23:08 +01:00
plugins: [react(), image()],
define: {
// In dev, we need to disable this, but in prod, we need to enable it
"process.env.NODE_ENV": JSON.stringify("production")
2024-01-25 02:20:26 +01:00
},
build: {
lib: {
2024-01-31 18:23:08 +01:00
entry: "src/main.jsx",
name: "EmbeddedAnythingLLM",
formats: ["umd"],
2024-01-25 02:20:26 +01:00
fileName: (format) => `embedded-anything-llm.${format}.js`
},
rollupOptions: {
2024-01-31 18:23:08 +01:00
external: []
2024-01-25 02:20:26 +01:00
},
cssCodeSplit: false,
assetsInlineLimit: 100000000,
2024-01-31 18:23:08 +01:00
minify: "esbuild",
outDir: "dist",
2024-01-25 02:20:26 +01:00
emptyOutDir: true,
inlineDynamicImports: true,
2024-01-31 18:23:08 +01:00
assetsDir: ""
2024-01-25 02:20:26 +01:00
}
2024-01-31 18:23:08 +01:00
})