mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
site/admin-ui: relative asset base for single-origin path prefix
Use base './' so built index.html references ./assets/... instead of /assets/..., letting the SPAs work under the Easy Launcher's single-origin path prefix (https://<apex>/__dn/admin/) as well as the subdomain layout. Root-absolute paths would skip the prefix and 404.
This commit is contained in:
@@ -7,7 +7,15 @@ import path from 'node:path';
|
||||
// up at admin.localhost without any extra publish wiring.
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
base: '/',
|
||||
// Relative-base so the built index.html references its assets as
|
||||
// `./assets/...` instead of `/assets/...`. Required when the SPA is
|
||||
// served under a path prefix like the Easy Launcher's single-origin
|
||||
// mode (`https://<apex>/__dn/admin/`) — a root-absolute asset path
|
||||
// would skip the /__dn/admin/ prefix and 404 on the wrong server
|
||||
// host. Still works fine for the subdomain case
|
||||
// (`admin.<apex>/...`) since `./assets/...` resolves against the
|
||||
// document URL in both shapes.
|
||||
base: './',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
|
||||
Reference in New Issue
Block a user