godcrm/vite.config.desktop.ts
GOD CRM Release f89e074dd1
Some checks failed
CI / Lint / Typecheck / Test / Build (push) Has been cancelled
CI / PostgreSQL Integration Tests (push) Has been cancelled
GOD CRM — public scrubbed snapshot
Governed substrate for autonomous agents: scoped identity (passports),
audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
2026-08-10 04:01:45 +03:00

40 lines
1 KiB
TypeScript

import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version || '1.2.0'),
},
plugins: [
react({
// ADR-0058 — auto-tracks reading signal.value inside JSX/components
babel: {
plugins: [['module:@preact/signals-react-transform']],
},
}),
],
// Use relative paths for Electron desktop app
base: './',
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
},
build: {
rollupOptions: {
output: {
entryFileNames: `assets/[name]-[hash].js`,
chunkFileNames: `assets/[name]-[hash].js`,
assetFileNames: `assets/[name]-[hash].[ext]`,
manualChunks: {
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
'vendor-icons': ['lucide-react'],
},
}
}
}
});