apps/ui: Warp's design system for Vue 3 + Tailwind v4. Tokens, fonts, icons and logo come from the brand package, with a Tailwind theme on the tokens and Vue components on the brand component styles. apps/admin: the admin panel as a separate, optional service. warp-admin embeds the built Vue app and proxies only the login endpoints and /_warp/admin/v1 to the homeserver. Pages: dashboard, users, rooms, federation, registration and tokens, server notices, application services, audit log. Also: pnpm workspace, go.work entry, Dockerfile, an `admin` compose profile, Makefile targets, a CI job with a proxy smoke test, and docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
972 B
TypeScript
30 lines
972 B
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { defineConfig } from 'vite'
|
|
|
|
// In development the panel talks to a homeserver through Vite's proxy, the
|
|
// same paths warp-admin proxies in production, so the code never needs to
|
|
// know where the homeserver is. WARP_ADMIN_HOMESERVER points it elsewhere.
|
|
const homeserver = process.env.WARP_ADMIN_HOMESERVER ?? 'http://localhost:8008'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue(), tailwindcss()],
|
|
resolve: {
|
|
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
|
|
},
|
|
build: {
|
|
// Embedded into the warp-admin binary by internal/panel.
|
|
outDir: 'internal/panel/build/dist',
|
|
emptyOutDir: true,
|
|
assetsInlineLimit: 0,
|
|
},
|
|
server: {
|
|
port: 5174,
|
|
proxy: {
|
|
'/_matrix': { target: homeserver, changeOrigin: true },
|
|
'/_warp/admin': { target: homeserver, changeOrigin: true },
|
|
},
|
|
},
|
|
})
|