mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
14d2b79c72
* use safeloader * use json responses wherever possible * remove CORS and add CSRF token * formatting fixes * add envjs back * fix baseurl test
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
/// <reference types="vitest" />
|
|
import path from 'path';
|
|
import { defineConfig } from 'vite';
|
|
import preact from '@preact/preset-vite';
|
|
import monacoEditorPlugin from 'vite-plugin-monaco-editor';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
define: {
|
|
'import.meta.vitest': 'undefined',
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:5000'
|
|
}
|
|
}
|
|
},
|
|
plugins: [
|
|
preact(),
|
|
monacoEditorPlugin.default({
|
|
customWorkers: [{ label: 'yaml', entry: 'monaco-yaml/yaml.worker' }],
|
|
languageWorkers: ['editorWorkerService'], // we don't use any of the default languages
|
|
}),
|
|
],
|
|
test: {
|
|
environment: 'jsdom',
|
|
alias: {
|
|
'testing-library': path.resolve(__dirname, './__test__/testing-library.js'),
|
|
},
|
|
setupFiles: ['./__test__/test-setup.ts'],
|
|
includeSource: ['src/**/*.{js,jsx,ts,tsx}'],
|
|
coverage: {
|
|
reporter: ['text-summary', 'text'],
|
|
},
|
|
mockReset: true,
|
|
restoreMocks: true,
|
|
globals: true,
|
|
},
|
|
});
|