fix: build frontend and fix tsc errors blocking the build
vite.config.ts used defineConfig from 'vite' which doesn't accept the 'test' key — switch to 'vitest/config' which extends it. Also type the onChange test helper as (knob: KnobConfig) => void instead of the overly broad ReturnType<typeof vi.fn>. Run npm run build to ship the compiled static assets.main
parent
42fa2fb78a
commit
01d293ebe2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -7,8 +7,8 @@
|
|||
<meta name="theme-color" content="#0d1117" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<title>TurnUp</title>
|
||||
<script type="module" crossorigin src="/assets/index-Dcy9vL-q.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-35WG7lRs.css">
|
||||
<script type="module" crossorigin src="/assets/index-1cIxdxyn.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Bit2B6Yg.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ interface RenderOptions {
|
|||
runningApps?: string[];
|
||||
sinks?: AudioDevice[];
|
||||
sources?: AudioDevice[];
|
||||
onChange?: ReturnType<typeof vi.fn>;
|
||||
onChange?: (knob: KnobConfig) => void;
|
||||
}
|
||||
|
||||
function renderCard(
|
||||
overrides: Partial<KnobConfig> = {},
|
||||
{ runningApps, sinks, sources, onChange = vi.fn() }: RenderOptions = {},
|
||||
{ runningApps, sinks, sources, onChange = vi.fn() as (knob: KnobConfig) => void }: RenderOptions = {},
|
||||
) {
|
||||
const knob: KnobConfig = {
|
||||
action: 'app_volume',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { defineConfig } from 'vite'
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from 'vitest/config'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vite.dev/config/
|
||||
|
|
|
|||
Loading…
Reference in New Issue