From f8bb96fefee5e48fe64012e02ce64595f801b963 Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Wed, 10 Dec 2025 12:45:41 +0100 Subject: [PATCH] correzioni --- index.html | 27 ++++++++++++++------------- vite.config.ts | 36 ++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/index.html b/index.html index 30ae8bf..144d9fb 100644 --- a/index.html +++ b/index.html @@ -51,25 +51,26 @@ -
- - + + \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index ee5fb8d..b5dfaf9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,23 +1,19 @@ -import path from 'path'; -import { defineConfig, loadEnv } from 'vite'; +import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; -export default defineConfig(({ mode }) => { - const env = loadEnv(mode, '.', ''); - return { - server: { - port: 3000, - host: '0.0.0.0', +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], + server: { + proxy: { + '/api': { + target: 'http://localhost:3000', + changeOrigin: true, }, - plugins: [react()], - define: { - 'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY), - 'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY) - }, - resolve: { - alias: { - '@': path.resolve(__dirname, '.'), - } - } - }; -}); + }, + }, + build: { + outDir: 'dist', + emptyOutDir: true, + }, +}); \ No newline at end of file