mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-24 18:26:51 +03:00
* 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
60 lines
1.3 KiB
TypeScript
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"),
|
|
},
|
|
},
|
|
});
|