Initial commit for iiEasy: all files included
This commit is contained in:
30
vite.config.ts
Executable file
30
vite.config.ts
Executable file
@@ -0,0 +1,30 @@
|
||||
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',
|
||||
'next.iieasy.ru'
|
||||
], // Разрешаем твой домен
|
||||
},
|
||||
// ------------------------
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user