File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ class PatchedHonoServerPlugin extends HonoServerPlugin {
6060 const path = require ( 'path' ) ;
6161
6262 // Manual Asset Handler to ensure assets are served
63- app . get ( '/assets/*' , async ( c : any ) => {
64- const filePath = path . join ( path . resolve ( staticRoot ) , c . req . path ) ;
63+ app . get ( '/console/ assets/*' , async ( c : any ) => {
64+ const filePath = path . join ( path . resolve ( staticRoot ) , c . req . path . replace ( '/console' , '' ) ) ;
6565 if ( fs . existsSync ( filePath ) ) {
6666 const ext = path . extname ( filePath ) ;
6767 let contentType = 'application/octet-stream' ;
@@ -78,7 +78,7 @@ class PatchedHonoServerPlugin extends HonoServerPlugin {
7878 } ) ;
7979
8080 // Register fallback after serveStatic (which is added in listen/originalStart)
81- app . get ( '*' , async ( c : any ) => {
81+ app . get ( '/console/ *' , async ( c : any ) => {
8282 // Ignore API calls -> let them 404
8383 if ( c . req . path . startsWith ( '/api' ) ) {
8484 return c . text ( 'Not Found' , 404 ) ;
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ import { ThemeProvider } from './components/theme-provider';
291291export function App ( ) {
292292 return (
293293 < ThemeProvider defaultTheme = "system" storageKey = "object-ui-theme" >
294- < BrowserRouter >
294+ < BrowserRouter basename = "/console" >
295295 < Routes >
296296 < Route path = "/apps/:appName/*" element = { < AppContent /> } />
297297 < Route path = "/" element = { < RootRedirect /> } />
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import path from 'path';
44
55// https://vitejs.dev/config/
66export default defineConfig ( {
7+ base : '/console/' ,
78 define : {
89 'process.env' : { } ,
910 'process.platform' : '"browser"' ,
You can’t perform that action at this time.
0 commit comments