mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-04 07:57:54 +00:00
ed553f1f19
Updates the backend listen port, Vite dev proxy target, Docker EXPOSE, compose port mapping, .env.example default, GitHub Actions smoke-test default, healthcheck URLs, and every doc/example reference. Test fixtures that include example URLs were updated for consistency, though their assertions are port-agnostic. The rate-limit value of 3000 in middleware/rateLimiters.ts and the 3000 entry in WEB_UI_PORTS (which detects user containers like Grafana) are intentionally untouched.
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
import { readFileSync } from 'fs'
|
|
|
|
const rootPkg = JSON.parse(readFileSync(path.resolve(__dirname, '../package.json'), 'utf-8'));
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(rootPkg.version),
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
// Disable the module-preload polyfill inline script.
|
|
// Vite injects a small inline <script> for module preloading that violates
|
|
// our CSP (script-src 'self' blocks all inline scripts). All modern browsers
|
|
// support <link rel="modulepreload"> natively, so the polyfill is unnecessary.
|
|
modulePreload: { polyfill: false },
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:1852',
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
'/ws': {
|
|
target: 'http://localhost:1852',
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
})
|