- docker-compose.dev.yml: drop Traefik/dev.resolutionflow.com labels, expose
backend:8000 and frontend:5173 directly; swap relative bind mounts for
${REPO_ROOT}/... so compose works when driven from inside a code-server
container with the host Docker socket mounted; default POSTGRES_PORT to
5433 host-side; add explicit uvicorn/npm run dev commands; add
ENABLE_MCP_MICROSOFT_LEARN and docker-01/Tailscale CORS origins.
- frontend/vite.config.ts: replace dev.resolutionflow.com with
allowedHosts=['docker-01', '.ts.net', 'localhost'] for direct-port access
over the private network.
- DEV-ENV.md: add Section 11 reference topology for the homelab Proxmox +
code-server Option B setup, plus troubleshooting entries for the
REPO_ROOT-empty-mount trap and the Vite allowedHosts rejection.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
84 lines
2.1 KiB
TypeScript
84 lines
2.1 KiB
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { sentryVitePlugin } from '@sentry/vite-plugin'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
react(),
|
|
sentryVitePlugin({
|
|
org: process.env.SENTRY_ORG,
|
|
project: process.env.SENTRY_PROJECT,
|
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
silent: !process.env.SENTRY_AUTH_TOKEN, // Don't error in local dev
|
|
}),
|
|
],
|
|
server: {
|
|
host: '0.0.0.0',
|
|
allowedHosts: ['docker-01', '.ts.net', 'localhost'],
|
|
watch: {
|
|
usePolling: true,
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './src/test/setup.ts',
|
|
include: ['src/**/*.{test,spec}.{ts,tsx}'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json-summary', 'html'],
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: [
|
|
'src/test/**',
|
|
'src/types/**',
|
|
'src/**/*.d.ts',
|
|
'src/instrument.ts',
|
|
'src/main.tsx',
|
|
],
|
|
},
|
|
},
|
|
build: {
|
|
sourcemap: 'hidden', // Generate source maps but don't expose them publicly
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
// React core and routing
|
|
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
|
// Markdown rendering
|
|
'markdown-vendor': ['react-markdown'],
|
|
// State management
|
|
'state-vendor': ['zustand', 'immer', 'zundo'],
|
|
// Icons
|
|
'icons-vendor': ['lucide-react'],
|
|
// Utilities and UI libs
|
|
'utils-vendor': [
|
|
'axios',
|
|
'clsx',
|
|
'tailwind-merge',
|
|
'class-variance-authority',
|
|
'date-fns',
|
|
'sonner',
|
|
],
|
|
// Drag and drop
|
|
'dnd-vendor': [
|
|
'@dnd-kit/core',
|
|
'@dnd-kit/sortable',
|
|
'@dnd-kit/utilities',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 500,
|
|
},
|
|
})
|