correzioni
This commit is contained in:
27
index.html
27
index.html
@@ -51,25 +51,26 @@
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"@google/genai": "https://aistudiocdn.com/@google/genai@^1.32.0",
|
||||
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.1/",
|
||||
"path": "https://aistudiocdn.com/path@^0.12.7",
|
||||
"pg": "https://aistudiocdn.com/pg@^8.16.3",
|
||||
"express": "https://aistudiocdn.com/express@^5.2.1",
|
||||
"dotenv": "https://aistudiocdn.com/dotenv@^17.2.3",
|
||||
"mysql2/": "https://aistudiocdn.com/mysql2@^3.15.3/",
|
||||
"url": "https://aistudiocdn.com/url@^0.11.4",
|
||||
"cors": "https://aistudiocdn.com/cors@^2.8.5",
|
||||
"react/": "https://aistudiocdn.com/react@^19.2.1/",
|
||||
"react": "https://aistudiocdn.com/react@^19.2.1",
|
||||
"lucide-react": "https://aistudiocdn.com/lucide-react@^0.556.0",
|
||||
"path": "https://aistudiocdn.com/path@^0.12.7",
|
||||
"cors": "https://aistudiocdn.com/cors@^2.8.5",
|
||||
"mysql2/": "https://aistudiocdn.com/mysql2@^3.15.3/",
|
||||
"dotenv": "https://aistudiocdn.com/dotenv@^17.2.3",
|
||||
"url": "https://aistudiocdn.com/url@^0.11.4",
|
||||
"express": "https://aistudiocdn.com/express@^5.2.1",
|
||||
"pg": "https://aistudiocdn.com/pg@^8.16.3"
|
||||
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.1/",
|
||||
"@vitejs/plugin-react": "https://aistudiocdn.com/@vitejs/plugin-react@^5.1.2",
|
||||
"@google/genai": "https://aistudiocdn.com/@google/genai@^1.32.0",
|
||||
"vite": "https://aistudiocdn.com/vite@^7.2.7",
|
||||
"lucide-react": "https://aistudiocdn.com/lucide-react@^0.556.0"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<link rel="stylesheet" href="/index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/index.tsx"></script>
|
||||
</body>
|
||||
<script type="module" src="/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user