mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
c5db16eeb0
Three carry-overs from the march branch (commits80cc4ce,cd9d105) and the launcher-side Vite build fix, all applicable to december without modification: 1. Vite admin-ui + site configs switch from `base: '/'` to `base: './'`. Built index.html now emits `<script src="./assets/...">` instead of `/assets/...`, so the Easy Launcher's single-origin path-prefix mode (`https://<apex>/__dn/admin/`) resolves assets under the prefix instead of skipping it and 404'ing on the wrong server host. 2. Mod.ResolveType promoted from private to internal so PhotonPatches' and SavePatches' local FindGameType helpers can delegate to the broader assembly-scan fallback (was misssing IL2CPP-mangled type names like the literal "PhotonNetwork"). Both helpers collapse to one-line `=> Mod.ResolveType(name);`. 3. Parked AuthValuesInjector_Prefix into DorkNet.ClientMod/attic/AuthValuesInjector.cs.attic. In december this method was defined but **never wired to a harmony hook** in OnLateInitializeMelon, so it was effectively dead code. Removed the method + GetCurrentLockToken helper + Cfg.InjectAuthValues field + LoadConfig reader + log mention. The .cs.attic suffix keeps the SDK's auto-globber from compiling the parked file. Restore notes inside the attic file describe how to re-enable — for december the suggested hook is a postfix on PUNNetworkManager.EMGGKBALALH (mutate the AuthValues there) instead of march's NetworkingPeer.CallAuthenticate which never fires in IL2CPP.
38 lines
1.1 KiB
TypeScript
38 lines
1.1 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,
|
|
},
|
|
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,
|
|
},
|
|
},
|
|
},
|
|
});
|