Dockerfile builds apps/backoffice into /srv/admin and the old admin with base /old/; nginx serves /old/ with its own uncached index.html. Worker notification links point to the new admin pages (moves, requests, chats); BACKOFFICE_URL defaults to ADMIN_URL. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
16 lines
679 B
TypeScript
16 lines
679 B
TypeScript
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vite';
|
|
|
|
// В разработке API проксируется — Mini App и API на одном origin (удобно и для туннеля https)
|
|
// ADMIN_BASE=/old/ — в продакшене старая админка живёт по адресу admin.barevclub.com/old/
|
|
export default defineConfig({
|
|
base: process.env.ADMIN_BASE ?? '/',
|
|
plugins: [react()],
|
|
server: {
|
|
host: true,
|
|
allowedHosts: true,
|
|
proxy: { '/trpc': 'http://localhost:4000', '/files': 'http://localhost:4000', '/client-log': 'http://localhost:4000' },
|
|
},
|
|
build: { target: 'es2022', sourcemap: true },
|
|
});
|