correzioni
This commit is contained in:
27
index.html
27
index.html
@@ -51,25 +51,26 @@
|
|||||||
<script type="importmap">
|
<script type="importmap">
|
||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
"@google/genai": "https://aistudiocdn.com/@google/genai@^1.32.0",
|
"path": "https://aistudiocdn.com/path@^0.12.7",
|
||||||
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.1/",
|
"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/",
|
||||||
"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",
|
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.1/",
|
||||||
"path": "https://aistudiocdn.com/path@^0.12.7",
|
"@vitejs/plugin-react": "https://aistudiocdn.com/@vitejs/plugin-react@^5.1.2",
|
||||||
"cors": "https://aistudiocdn.com/cors@^2.8.5",
|
"@google/genai": "https://aistudiocdn.com/@google/genai@^1.32.0",
|
||||||
"mysql2/": "https://aistudiocdn.com/mysql2@^3.15.3/",
|
"vite": "https://aistudiocdn.com/vite@^7.2.7",
|
||||||
"dotenv": "https://aistudiocdn.com/dotenv@^17.2.3",
|
"lucide-react": "https://aistudiocdn.com/lucide-react@^0.556.0"
|
||||||
"url": "https://aistudiocdn.com/url@^0.11.4",
|
|
||||||
"express": "https://aistudiocdn.com/express@^5.2.1",
|
|
||||||
"pg": "https://aistudiocdn.com/pg@^8.16.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="/index.css">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/index.tsx"></script>
|
<script type="module" src="/index.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,23 +1,19 @@
|
|||||||
import path from 'path';
|
import { defineConfig } from 'vite';
|
||||||
import { defineConfig, loadEnv } from 'vite';
|
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
// https://vitejs.dev/config/
|
||||||
const env = loadEnv(mode, '.', '');
|
export default defineConfig({
|
||||||
return {
|
plugins: [react()],
|
||||||
server: {
|
server: {
|
||||||
port: 3000,
|
proxy: {
|
||||||
host: '0.0.0.0',
|
'/api': {
|
||||||
|
target: 'http://localhost:3000',
|
||||||
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
plugins: [react()],
|
},
|
||||||
define: {
|
},
|
||||||
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
|
build: {
|
||||||
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
|
outDir: 'dist',
|
||||||
},
|
emptyOutDir: true,
|
||||||
resolve: {
|
},
|
||||||
alias: {
|
});
|
||||||
'@': path.resolve(__dirname, '.'),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user