Rentenversicherer/vite.config.ts
Kenearos 778caa8a45 refactor: Migrate to ESM and Vite for modern build
Updates package.json and index.html to use ES Modules and Vite for development and building. This includes migrating dependencies and removing old build scripts and testing configurations.

Also, simplifies the Gemini API key handling by directly using environment variables and refactors the Gemini response schema for clearer field definitions. Updates React component imports to use ESM paths for better maintainability.
2026-02-06 14:03:50 +01:00

14 lines
No EOL
409 B
TypeScript

import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
plugins: [react()],
define: {
// This is necessary to make process.env.API_KEY work in the browser
// usually Vite uses import.meta.env
'process.env.API_KEY': JSON.stringify(env.API_KEY)
}
};
});