Files
xenia-pos-local/manager_dashboard/vite.config.js
T
bonaminandClaude Opus 5.5 c7102f1c89 feat(manager): upgrade to React 19, React Router 7 and Vite 8 (same versions as the waiter)
Platform-v2 step 2.2: react/react-dom 19.2.5, react-router-dom 7.14.1, vite 8.0.9,
@vitejs/plugin-react 6.0.1, and react-is 19.2.5 (recharts' peer dependency, no
longer installed implicitly). React and the router are now shared by both apps
at the workspace root; the waiter resolves exactly the versions it had.
- .npmrc legacy-peer-deps for the whole workspace (vite-plugin-pwa 1.2 does not
  list Vite 8 yet; the waiter always installed this way)
- manager Vite dev/preview proxies /api, /api/ws and /static to :8000 like the waiter
No code changes were needed: every route renders and the main flows work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:27:10 +02:00

23 lines
770 B
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
// npm workspace (D-15): shared packages are imported from source, so make
// sure every import of React resolves to this app's copy.
resolve: {
dedupe: ['react', 'react-dom'],
},
server: {
host: '0.0.0.0',
port: 5174,
// Same as the waiter: the API is same-origin in production (nginx), so in
// dev (and `vite preview`) forward it to the local backend.
proxy: {
'/api/ws': { target: 'ws://localhost:8000', ws: true, changeOrigin: true },
'/api': { target: 'http://localhost:8000', changeOrigin: true },
'/static': { target: 'http://localhost:8000', changeOrigin: true },
},
},
})