Files
DorkNet/DorkNet.Server/site/vite.config.ts
T
Alexa 955246c6e4 feat: Refactor admin UI pages to support embedded mode and improve navigation
- Updated PlayerLogs, Players, Reports, Rooms, Settings, SignupCodes, and other pages to accept an optional `embedded` prop for better integration in various contexts.
- Introduced a new Activity page consolidating audit logs and player request logs with tab navigation.
- Added Content page for community board and loading tips with tab navigation.
- Created Moderation page to unify player directory, bans, and reports under a single interface.
- Implemented SettingsHome page to manage server settings and signup codes with tab navigation.
- Enhanced the Join page to include password creation for new accounts.
- Added global friends feature in Settings to allow all accounts to be friends without database entries.
- Introduced RelationshipQueries service to manage effective friend resolution based on global friends toggle.
- Added WireDates for consistent date handling in serialized data.
- Created reusable Tabs component for consistent tab navigation across various pages.
2026-06-06 16:39:19 +03:00

44 lines
1.3 KiB
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'node:path';
// Public-facing site. Source lives at DorkNet.Server/site; build emits
// straight into DorkNet.Server/wwwroot/site so the static file
// middleware picks it up at the apex localhost / rec.net hosts without
// any extra publish wiring.
export default defineConfig({
plugins: [react()],
// Relative-base — see admin-ui/vite.config.ts. Same single-origin
// path-prefix scenario applies if the site ever gets opened through
// `https://<apex>/__dn/www/`.
base: './',
resolve: {
alias: { '@': path.resolve(__dirname, 'src') },
},
build: {
outDir: path.resolve(__dirname, '../wwwroot/site'),
emptyOutDir: true,
target: 'es2022',
sourcemap: true,
rollupOptions: {
output: {
entryFileNames: 'assets/[name]-join-password-[hash].js',
chunkFileNames: 'assets/[name]-join-password-[hash].js',
},
},
},
server: {
port: 5174,
proxy: {
// Dev convenience: `npm run dev` proxies API calls to the
// running ASP.NET server so we can iterate on the SPA with HMR
// without dealing with CORS.
'/api': {
target: 'http://localhost:80',
changeOrigin: true,
secure: false,
},
},
},
});