From fc42d43ded87f2f9668b0eeae2726e1a02f9310a Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sat, 18 Nov 2023 17:39:39 +0100 Subject: [PATCH] Updated the vite.config.js --- client/vite.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/vite.config.js b/client/vite.config.js index c7a4f78..d153874 100644 --- a/client/vite.config.js +++ b/client/vite.config.js @@ -1,6 +1,22 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; +import * as path from "path"; export default defineConfig({ plugins: [react()], + resolve: { + alias: { + "@styles": path.resolve(__dirname, "./src/common/styles"), + "@": path.resolve(__dirname, "./src"), + }, + }, + server: { + proxy: { + "/api": { + target: "http://localhost:3000", + changeOrigin: true, + rewrite: (path) => path.replace(/^\/api/, ""), + } + } + } }); \ No newline at end of file