clipwright/dashboard/vite.config.js
pedro-bento 59e0db8c24 chore: remove dead code, unused assets, and the server-render chain
Backend:
- Drop unused imports/locals and zero-reference helpers (truncate_ip,
  in_split, GEMINI_PROMPT_TEMPLATE, legacy subtitles SRT path, dead paths)
- Remove unwired features (delete_uploaded, mark_ai_generated, unmark_job,
  compact_words, restoring_static restorer hook, gemini_worker __main__)
- Remove shelved panel_layout module + its flags/tests
- Remove the /api/render proxy + RENDER_SERVICE_URL

Frontend:
- Delete App.css, react.svg, vite.svg, agent screenshot, demo mp4s
- Remove dead exports (downloadBlobUrl, consent reopen machinery, dead zod
  schemas/CITED_STATS) and unused deps (@remotion/media-utils, zod)
- Drop the /render dev proxy; rewrite dashboard README

Repo/config:
- Delete render-service/ and top-level remotion/ (superseded by the
  dashboard's in-browser Remotion copy); drop the compose renderer service
- Delete docker-compose.e2e.local.yml and 4 unreferenced screenshots
- Prune .env.example dead keys, add GEMINI_API_KEY/MAX_CONCURRENT_JOBS
- Tighten .dockerignore/.gitignore; add dashboard lint to CI
- Fix stale compliance doc + README structure

Backend 709 passed / 18 skipped; dashboard lint+build green; compose valid.
2026-10-04 21:24:42 +01:00

40 lines
1.5 KiB
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import seo from './vite-plugin-seo'
// Backend target for the dev proxy. Defaults to the docker-compose service
// name; set VITE_PROXY_TARGET=http://localhost:8000 to run the dev server on
// the host against a backend reachable at localhost (no CORS, same-origin).
const backend = process.env.VITE_PROXY_TARGET || 'http://backend:8000'
// https://vitejs.dev/config/
export default defineConfig({
// seo() runs on build only. It injects the crawler-visible homepage content
// into #root and emits the static /alternatives pages, sitemap.xml and
// llms.txt. See vite-plugin-seo.js.
plugins: [react(), seo()],
// The free tools (/youtube-transcript-generator and friends) are static
// pages emitted by seo(); their behaviour ships as small standalone entries
// with no React in them. vite-plugin-seo.js finds each entry's hashed file
// name in the bundle and adds the <script> to its page.
build: {
rollupOptions: {
input: {
main: 'index.html',
'tool-transcript': 'tools/transcript.js',
'tool-metadata': 'tools/metadata.js',
'tool-vertical': 'tools/vertical.js',
},
},
},
server: {
allowedHosts: [
'git.pbento.pt',
],
proxy: {
'/api': { target: backend, changeOrigin: true },
'/videos': { target: backend, changeOrigin: true },
'/thumbnails': { target: backend, changeOrigin: true },
}
}
})