feat: Update project dependencies and configuration

This commit updates the project's dependencies, including React, Recharts, and Lucide React, to their latest stable versions. It also introduces a `server.js` file to handle static file serving with Express for better production deployment. Additionally, TypeScript and Vite configurations have been refined for improved build performance and type safety.
This commit is contained in:
MMrp89
2026-02-10 01:12:15 -03:00
parent 1a57ac7754
commit 8c770d43c8
6 changed files with 90 additions and 68 deletions

View File

@@ -1,23 +1,15 @@
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',
},
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, '.'),
}
}
};
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
define: {
'process.env': process.env
},
build: {
outDir: 'dist',
emptyOutDir: true,
}
});