Files
iiEasy/vite.config.ts
2026-02-04 21:01:56 +05:00

30 lines
924 B
TypeScript
Executable File

import path from 'path';
import { fileURLToPath } from 'url';
import { defineConfig, loadEnv } from 'vite';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
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, '.'),
},
},
// --- ДОБАВЬ ЭТОТ БЛОК ---
server: {
host: '0.0.0.0', // Чтобы слушал все интерфейсы
port: 5173, // Твой порт
allowedHosts: ['iieasy.ru',
'n8n.iieasy.ru'
], // Разрешаем твой домен
},
// ------------------------
};
});