Files
dss/admin-ui/vite.config.ts
Bruno Sarlo 71c6dc805a
Some checks failed
DSS Project Analysis / dss-context-update (push) Has been cancelled
feat: Rebuild admin-ui with Preact + Signals
Complete rebuild of the admin-ui using Preact + Signals for a lightweight,
reactive framework. Features include:

- Team-centric workdesks (UI, UX, QA, Admin)
- Comprehensive API client with 150+ DSS backend endpoints
- Dark mode with system preference detection
- Keyboard shortcuts and command palette
- AI chat sidebar with Claude integration
- Toast notifications system
- Export/import functionality for project backup
- TypeScript throughout with full type coverage

Bundle size: ~66KB main (21KB gzipped), ~5KB framework overhead

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 20:29:21 -03:00

78 lines
1.7 KiB
TypeScript

import { defineConfig } from 'vite';
import preact from '@preact/preset-vite';
import { VitePWA } from 'vite-plugin-pwa';
import { resolve } from 'path';
export default defineConfig({
plugins: [
preact(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'robots.txt', 'apple-touch-icon.png'],
manifest: {
name: 'DSS Admin',
short_name: 'DSS',
description: 'Design System Server Administration',
theme_color: '#0f172a',
background_color: '#ffffff',
display: 'standalone',
icons: [
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
runtimeCaching: [
{
urlPattern: /^\/api\/.*/i,
handler: 'NetworkFirst',
options: {
cacheName: 'api-cache',
expiration: {
maxEntries: 100,
maxAgeSeconds: 60 * 60 // 1 hour
}
}
}
]
}
})
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
'react': 'preact/compat',
'react-dom': 'preact/compat'
}
},
server: {
port: 3456,
proxy: {
'/api': {
target: 'http://localhost:8002',
changeOrigin: true
}
}
},
build: {
outDir: 'dist',
sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
'preact': ['preact', '@preact/signals']
}
}
}
}
});