Files
xll-bi/vite.config.ts
kkfluous f265db46ca
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix(deploy): serve under /xll-bi/ prefix and bump host port to 8214
Reverse proxy at demo-ctx.lnh2e.com forwards /xll-bi/* unchanged to the
container, so the container's nginx must match that location and Vite
must build asset URLs under the same prefix — otherwise the SPA shell
returns 404 and the JS/CSS resolve to /assets/* with no handler.

- nginx.conf: rename location /bi/ → /xll-bi/ (and assets sub-location)
- vite.config.ts: set base: '/xll-bi/' so built index.html references
  /xll-bi/assets/*
- docker-compose.yml: 8114 → 8214 to match the upstream the proxy targets

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 18:35:08 +08:00

26 lines
727 B
TypeScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import {defineConfig, loadEnv} from 'vite';
export default defineConfig(({mode}) => {
const env = loadEnv(mode, '.', '');
return {
base: '/xll-bi/',
plugins: [react(), tailwindcss()],
define: {
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
},
},
server: {
// HMR is disabled in AI Studio via DISABLE_HMR env var.
// Do not modify—file watching is disabled to prevent flickering during agent edits.
hmr: process.env.DISABLE_HMR !== 'true',
},
};
});