-
Notifications
You must be signed in to change notification settings - Fork 724
Description
I want to mount a Fresh app to an Hono instance.
Doing this works:
import { Hono } from "jsr:@hono/hono";
import UI from "./_fresh/server.js";
const app = new Hono();
app.mount('/', UI.fetch);
Deno.serve(app.fetch);
But i want to mount the fresh app to another path:
app.mount('/ui', UI.fetch);
Opening http://localhost:8000/ui from browser correctly loads index.html, but all other files/assets return a 404.
That is a relative path issue.
I tried setting "basepath" in FreshConfig, and also "base" in vite.config.ts.
Either way i could not make it work.
I think Fresh is overriding/ignoring the vite's base property.
Trying with the initial fresh counter app.
Opening http://localhost:8000/ui/api/World from browser works and returns "Hello, World!".
Using Deno 2.5.0 and Fresh 2.0.
Metadata
Metadata
Assignees
Labels
No labels