Skip to content

Commit c0976a4

Browse files
committed
Restore console basePath to /console/
Reinstate the console app's default base path to '/console/' while allowing overrides for root deployments. Changes: - apps/console/vite.config.ts: default basePath set to process.env.VITE_BASE_PATH || '/console/' (can be overridden). - e2e/helpers/index.ts: CONSOLE_BASE updated to '/console' to match the default base. - playwright.config.ts: test server URL updated to include '/console/'. - apps/console/vercel.json: buildCommand sets VITE_BASE_PATH=/ for Vercel builds that need the app served at root. - ROADMAP.md: removed the completed P1.16 "Console Base Path Unification" section. These adjustments keep the SPA mount consistent at '/console/' by default while supporting standalone/root deployment via the VITE_BASE_PATH env var.
1 parent 4efcea7 commit c0976a4

5 files changed

Lines changed: 7 additions & 15 deletions

File tree

ROADMAP.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -860,16 +860,6 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind
860860
- [x] 10 unit tests for `useObjectLabel` hook
861861
- [x] Zero changes to object metadata files or translation files
862862

863-
### P1.16 Console Base Path Unification ✅
864-
865-
> **Status:** Complete — Console app base path unified to `/` across all environments.
866-
867-
- [x] `apps/console/vite.config.ts`: base path changed from `/console/` to `/`
868-
- [x] `e2e/helpers/index.ts`: `CONSOLE_BASE` changed from `/console` to `''`
869-
- [x] `apps/console/vercel.json`: removed `VITE_BASE_PATH=/` override (now redundant)
870-
- [x] `playwright.config.ts`: webServer url updated from `/console/` to `/`
871-
- [x] `apps/console/plugin.ts`: updated JSDoc to reflect new base path
872-
873863
---
874864

875865
## 🧩 P2 — Polish & Advanced Features

apps/console/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
33
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
4-
"buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && pnpm build:vercel",
4+
"buildCommand": "cd ../.. && pnpm turbo run build --filter=@object-ui/console^... && cd apps/console && VITE_BASE_PATH=/ pnpm build:vercel",
55
"outputDirectory": "dist",
66
"framework": "vite",
77
"rewrites": [

apps/console/vite.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ function preloadCriticalChunks(): Plugin {
3636
};
3737
}
3838

39-
const basePath = '/';
39+
// Base path for SPA deployment. Always '/console/' to match the HonoServerPlugin
40+
// auto-mount slug. Override with VITE_BASE_PATH only if deploying standalone.
41+
const basePath = process.env.VITE_BASE_PATH || '/console/';
4042

4143
// https://vitejs.dev/config/
4244
export default defineConfig({

e2e/helpers/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { Page } from '@playwright/test';
22

33
/**
44
* Base path for the console app.
5-
* Matches `base` in `apps/console/vite.config.ts` (always '/').
5+
* Matches `base` in `apps/console/vite.config.ts` (defaults to '/console/').
66
*/
7-
export const CONSOLE_BASE = '';
7+
export const CONSOLE_BASE = '/console';
88

99
/** Wait for React to mount (at least one child inside #root). */
1010
export async function waitForReactMount(page: Page) {

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default defineConfig({
6868
command: process.env.CI
6969
? 'pnpm --filter @object-ui/console preview --port 4173'
7070
: 'pnpm turbo run build --filter=@object-ui/console && pnpm --filter @object-ui/console preview --port 4173',
71-
url: 'http://localhost:4173/',
71+
url: 'http://localhost:4173/console/',
7272
reuseExistingServer: !process.env.CI,
7373
timeout: 180 * 1000,
7474
},

0 commit comments

Comments
 (0)