Files
frigate/web/vite.config.ts
T
Josh HawkinsandGitHub ba41c90c07 Remove unused deps (#24355)
* remove unused web test deps

Nothing runs vitest. The CI step that called `npm run test` is commented out, `web/__test__/` was deleted in https://github.com/blakeblackshear/frigate/pull/8983 so `setupFiles` points at a missing file, and there are no unit tests, so `npx vitest run` only picks up the Playwright specs and fails. jsdom, `@testing-library/jest-dom`, msw and fake-indexeddb were only there for vitest.

* update contributing docs

* remove unused deps
2026-09-15 14:02:02 -06:00

60 lines
1.3 KiB
TypeScript

import path, { resolve } from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import monacoEditorPlugin from "vite-plugin-monaco-editor";
const proxyHost = process.env.PROXY_HOST || "localhost:5000";
// https://vitejs.dev/config/
export default defineConfig({
server: {
proxy: {
"/api": {
target: `http://${proxyHost}`,
ws: true,
},
"/vod": {
target: `http://${proxyHost}`,
},
"/clips": {
target: `http://${proxyHost}`,
},
"/exports": {
target: `http://${proxyHost}`,
},
"/ws": {
target: `ws://${proxyHost}`,
ws: true,
},
"/live": {
target: `ws://${proxyHost}`,
changeOrigin: true,
ws: true,
},
},
},
build: {
rolldownOptions: {
input: {
main: resolve(import.meta.dirname, "index.html"),
login: resolve(import.meta.dirname, "login.html"),
},
output: {
keepNames: true,
},
},
},
plugins: [
react(),
monacoEditorPlugin.default({
customWorkers: [{ label: "yaml", entry: "monaco-yaml/yaml.worker" }],
languageWorkers: ["editorWorkerService"], // we don't use any of the default languages
}),
],
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "./src"),
},
},
});