Files
ActionBlock/actionBlocks_website/vite.config.ts
T
2026-10-24 21:16:18 +02:00

26 lines
705 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// Dev server forwards /hub to a locally running game server (dotnet run).
const devServer = process.env.DEV_SERVER_URL ?? 'http://localhost:5080';
export default defineConfig({
plugins: [react()],
// Relative URLs so the site works under any sub-path (e.g. https://example.com/website/).
base: './',
build: {
// Hashed bundles go to /static; /assets holds the exchangeable graphics from public/.
assetsDir: 'static',
},
css: {
modules: {
localsConvention: 'camelCaseOnly',
},
},
server: {
proxy: {
'/hub': { target: devServer, ws: true, changeOrigin: true },
},
},
});