mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
Providers write cache files and logs into .gev-cache and .gev-logs while the app runs. A serve-only standalone plugin adds both to server.watch.ignored, so the dev watcher no longer stats them; source changes still reload.
35 lines
1.4 KiB
JavaScript
35 lines
1.4 KiB
JavaScript
import { fileURLToPath } from 'node:url';
|
|
import { defineConfig, loadEnv } from 'vite';
|
|
import { resolveAllowedHosts } from '../../build/allowedHosts.js';
|
|
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';
|
|
import { unwatchedRuntimeDirsPlugin } from './unwatched-cache.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(),
|
|
unwatchedRuntimeDirsPlugin(),
|
|
],
|
|
googleApiKey: process.env.GOOGLE_MAPS_API_KEY,
|
|
cesiumToken: process.env.CESIUM_ION_TOKEN,
|
|
mapillaryToken: process.env.MAPILLARY_CLIENT_TOKEN,
|
|
host: process.env.HOST,
|
|
port: process.env.PORT,
|
|
allowedHosts: resolveAllowedHosts(process.env.GEV_ALLOWED_HOSTS),
|
|
command,
|
|
});
|
|
});
|