35 lines
847 B
TypeScript
35 lines
847 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: process.env.DISABLE_HMR !== 'true',
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://192.168.20.13:8090',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/notify': {
|
|
target: 'https://apprise.lab.audasmedia.com.au',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|