Upgraded NPM packages versions, fixed SVG loadings and removed DaisyUI

This commit is contained in:
Lucas Oliveira 2024-06-17 10:31:53 -03:00
commit 07bf5e1573
8 changed files with 2956 additions and 3845 deletions

View file

@ -0,0 +1,32 @@
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
import svgr from "vite-plugin-svgr";
const apiRoutes = ["^/api/v1/", "/health"];
// Use environment variable to determine the target.
const target = process.env.VITE_PROXY_TARGET || "http://127.0.0.1:7860";
// Use environment variable to determine the UI server port
const port = Number(process.env.VITE_PORT) || 3000;
const proxyTargets = apiRoutes.reduce((proxyObj, route) => {
proxyObj[route] = {
target: target,
changeOrigin: true,
secure: false,
ws: true,
};
return proxyObj;
}, {});
export default defineConfig({
build: {
outDir: "build",
},
plugins: [react(), svgr()],
server: {
port: port,
proxy: {
...proxyTargets,
},
},
});