diff --git a/client/vercel.json b/client/vercel.json index 5b2ed13..c07c199 100644 --- a/client/vercel.json +++ b/client/vercel.json @@ -35,8 +35,5 @@ } ] } - ], - "env": { - "VITE_API_URL": "@vite_api_url" - } -} \ No newline at end of file + ] +} diff --git a/client/vite.config.js b/client/vite.config.js index ecc828f..a75b012 100644 --- a/client/vite.config.js +++ b/client/vite.config.js @@ -1,22 +1,25 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + server: { port: 3000, + proxy: { - // Forward all /api requests to the backend server '/api': { target: 'http://localhost:5000', changeOrigin: true, }, }, }, + build: { outDir: 'dist', sourcemap: false, + rollupOptions: { output: { manualChunks: { @@ -27,7 +30,4 @@ export default defineConfig({ }, }, }, - define: { - 'process.env.VITE_API_URL': JSON.stringify(process.env.VITE_API_URL), - }, -}) \ No newline at end of file +});