mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
import { fileURLToPath } from 'node:url';
|
|
import { defineConfig, loadEnv } from 'vite';
|
|
import { createBrowserViteConfig } from '../../build/vite.js';
|
|
import { localProviderPlugins } from '../providers/local.js';
|
|
import { localMcpPlugin } from '../mcp/plugin.js';
|
|
import { apiNotFoundPlugin } from './api-not-found.js';
|
|
import { standaloneVoiceTools } from './voiceTools.js';
|
|
|
|
const root = fileURLToPath(new URL('../../', import.meta.url));
|
|
|
|
/** Load this checkout's configuration and attach its local provider middleware. */
|
|
export default defineConfig(({ command, mode }) => {
|
|
const loaded = loadEnv(mode, root, '');
|
|
for (const [key, value] of Object.entries(loaded)) {
|
|
if (process.env[key] === undefined) process.env[key] = value;
|
|
}
|
|
return createBrowserViteConfig({
|
|
plugins: [
|
|
...localProviderPlugins({ realtime: { tools: standaloneVoiceTools() } }),
|
|
localMcpPlugin(),
|
|
apiNotFoundPlugin(),
|
|
],
|
|
googleApiKey: process.env.GOOGLE_MAPS_API_KEY,
|
|
cesiumToken: process.env.CESIUM_ION_TOKEN,
|
|
host: process.env.HOST,
|
|
port: process.env.PORT,
|
|
command,
|
|
});
|
|
});
|