import { defineConfig } from 'vite'; import { resolve } from 'node:path'; export default defineConfig({ root: 'web', publicDir: false, server: { port: 5173, proxy: { '/api': 'http://localhost:4173', // Cover-art and other static media are served by the backend's // express.static('/media') mount; the dev server has to proxy // them or kiosk thumbnails 404 in `npm run dev`. '/media': 'http://localhost:4173', '/ws': { target: 'ws://localhost:4173', ws: true } } }, build: { outDir: '../server/public', emptyOutDir: true, rollupOptions: { input: { kiosk: resolve(__dirname, 'web/index.html'), admin: resolve(__dirname, 'web/admin/index.html'), docs: resolve(__dirname, 'web/docs/index.html'), master: resolve(__dirname, 'web/master/index.html') } } } });