🔨 refactor(menuBar): remove unused imports and code, add missing semicolon

🔨 refactor(vite.config): remove unused routes and commented code, remove rewrite function
The menuBar component had some unused imports and code that was removed. A missing semicolon was added to the code. The vite.config file had some unused routes and commented code that was removed. The rewrite function was also removed as it was not needed.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-14 09:28:50 -03:00
commit e4af874534
2 changed files with 6 additions and 33 deletions

View file

@ -1,19 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import svgr from "vite-plugin-svgr";
const apiRoutes = [
"/all",
"/predict",
"^/validate/*",
"^/chat/*",
"/version",
"/health",
"/flows/*",
"/flows/",
"/flows_styles",
"/flows_styles/",
"/flows_styles/*",
];
const apiRoutes = ["^/api/v1/"];
// Use environment variable to determine the target.
const target = process.env.VITE_PROXY_TARGET || "http://127.0.0.1:7860";
@ -24,7 +12,7 @@ const proxyTargets = apiRoutes.reduce((proxyObj, route) => {
changeOrigin: true,
secure: false,
ws: true,
rewrite: (path) => `/api/v1${path}`,
// rewrite: (path) => `/api/v1${path}`,
};
return proxyObj;
}, {});