Files
HarunCAN_Studio_FE/vite.config.ts
Harun CAN c339cb1382
Some checks failed
UI Deploy (Next-Auth Support) 🎨 / build-and-deploy (push) Has been cancelled
main
2026-03-17 13:16:22 +03:00

34 lines
845 B
TypeScript

import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
plugins: [react(), tailwindcss()],
define: {
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
},
},
server: {
// HMR is disabled in AI Studio via DISABLE_HMR env var.
hmr: process.env.DISABLE_HMR !== 'true',
proxy: {
'/api': {
target: 'http://127.0.0.1:3000',
changeOrigin: true,
},
'/uploads': {
target: 'http://127.0.0.1:3000',
changeOrigin: true,
},
},
},
};
});