Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- vite.config.ts: base path changed from /console/ to / - e2e/helpers: CONSOLE_BASE changed from /console to empty string - vercel.json: removed redundant VITE_BASE_PATH=/ override - playwright.config.ts: webServer url updated to / - plugin.ts: updated JSDoc comments - ROADMAP.md: added P1.16 entry Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Unifies the Console app’s Vite base path to / so local dev, preview/E2E, and Vercel deployments all resolve routes and assets from the root consistently.
Changes:
- Hardcode Vite
base: '/'and remove theVITE_BASE_PATHoverride path. - Update Playwright and E2E helper base URL/path assumptions to be root-relative.
- Simplify Vercel build command by removing the redundant
VITE_BASE_PATH=/env var.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| playwright.config.ts | Updates Playwright webServer URL from /console/ to /. |
| e2e/helpers/index.ts | Switches CONSOLE_BASE to '' to generate root-relative E2E URLs. |
| apps/console/vite.config.ts | Forces Vite base to / (no env override). |
| apps/console/vercel.json | Removes VITE_BASE_PATH=/ from the build command. |
| apps/console/plugin.ts | Updates JSDoc to reflect the new base path. |
| ROADMAP.md | Adds P1.16 entry documenting completion of the base-path unification. |
| * HonoServerPlugin auto-discovers this plugin via `type: 'ui-plugin'` | ||
| * and mounts it at `/<slug>` (i.e. `/console`). | ||
| * | ||
| * The SPA must be built with the matching base path: | ||
| * VITE_BASE_PATH=/console/ pnpm build | ||
| * The SPA is built with base path '/'. | ||
| * |
There was a problem hiding this comment.
The JSDoc still states HonoServerPlugin mounts this UI at /<slug> (i.e. /console), but the comment now says the SPA is built with base path '/'. If the plugin is actually served under /console, a '/' base will generate root-absolute asset URLs (e.g. /assets/...) that won’t resolve under /console. Please update the JSDoc to accurately describe the serving path (or document how default=true affects mounting), so the base path and mount path stay consistent.
| * Base path for the console app. | ||
| * Matches `base` in `apps/console/vite.config.ts` (defaults to '/console/'). | ||
| * Matches `base` in `apps/console/vite.config.ts` (always '/'). | ||
| */ | ||
| export const CONSOLE_BASE = '/console'; | ||
| export const CONSOLE_BASE = ''; |
There was a problem hiding this comment.
The comment says this matches Vite base (always '/'), but CONSOLE_BASE is set to an empty string. If the intent is “root-relative” URLs, consider updating the comment to clarify why this is '' (or set it to '/' and ensure call sites don’t produce double slashes).
Console app Vite
basedefaulted to/console/with aVITE_BASE_PATHenv override, causing inconsistency between local dev and production. Unified to/everywhere.Changes
apps/console/vite.config.ts— Hardcodebase: '/', remove env var overridee2e/helpers/index.ts—CONSOLE_BASE→''(all E2E URLs now root-relative)apps/console/vercel.json— Drop redundantVITE_BASE_PATH=/from build commandplaywright.config.ts— webServer URL/console/→/apps/console/plugin.ts— JSDoc updateROADMAP.md— P1.16 entryOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.