Files
Maestro/vite.config.mts
Pedram Amini 74f6c08f01 OAuth enabled but no valid token found. Starting authentication...
Found expired OAuth token, attempting refresh...
Token refresh successful
## CHANGES

- Revamped README with power features, screenshots, and crisp quick-start flow 🚀
- Added prominent User Docs badge linking to full documentation hub 📚
- Documented Auto Run playbooks for batch checklist execution and history tracking 
- Highlighted Git worktrees for parallel agents on isolated branches instantly 🌿
- Showcased Group Chat with moderator AI for coordinated multi-agent discussions 🗣️
- Introduced Remote Access docs for phone control via QR and tunnels 📱
- Documented `maestro-cli` for headless automation with JSONL scripting support 🧰
- Polished Achievement Card visuals: real GitHub logo and brighter trophies 🏆
- Improved Auto Run summaries by avoiding filename-extension sentence splitting ✍️
- Build and dev tweaks: disable npm rebuild and stop watching without HMR 🛠️
2025-12-28 04:04:27 -06:00

35 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { readFileSync } from 'fs';
// Read version from package.json as fallback
const packageJson = JSON.parse(readFileSync(path.join(__dirname, 'package.json'), 'utf-8'));
// Use VITE_APP_VERSION env var if set (during CI builds), otherwise use package.json
const appVersion = process.env.VITE_APP_VERSION || packageJson.version;
const disableHmr = process.env.DISABLE_HMR === '1';
export default defineConfig(({ mode }) => ({
plugins: [react({ fastRefresh: !disableHmr })],
root: path.join(__dirname, 'src/renderer'),
base: './',
define: {
__APP_VERSION__: JSON.stringify(appVersion),
},
esbuild: {
// Strip console.log and console.debug in production builds
drop: mode === 'production' ? ['console', 'debugger'] : [],
},
build: {
outDir: path.join(__dirname, 'dist/renderer'),
emptyOutDir: true,
},
server: {
port: 5173,
hmr: !disableHmr,
// Disable file watching entirely when HMR is disabled to prevent any reloads
watch: disableHmr ? null : undefined,
},
}));