Closed Bramart closed 8 months ago
Hi @Bramart, I coded this feature. There is a test for it here: https://github.com/denoland/fresh/blob/46eaef0181cba60a5e0284f58b24925e762c7784/tests/base_path_test.ts#L130 which uses: https://github.com/denoland/fresh/blob/46eaef0181cba60a5e0284f58b24925e762c7784/tests/fixture_base_path/routes/islands.tsx#L4
Can you provide some more details? They should all be redirected like this:
I'll need more information (ideally a repository which easily reproduces the problem) in order to proceed, because from my side it's working. I guess the test is missing something though.
Hi, here is a fresh repo I just create and still facing the same issue with : https://github.com/Bramart/fresh-project (deno fresh example with basepath config ...)
In local, it works for me too, they are redirected (I have interactivity) :
But once deployed behind another app, they are not (and no interactivity) :
In local, the redirection is made by fresh because fresh manage the whole app, but once deployed to a basepath and next to another app, those requests just hit on the root application like they are supposed to, no ?
You are very right there. I have a fix and I'm working on a test. Oops 😅
Trying to add a basepath
/neoplayer/
to a deno fresh app, with another app (node project) at the root. Basepath is setup in deno fresh config and import in main.ts. Everything works fine except the islands.In the html file loaded in the browser, basepath is applied to src and href (like said in the docs)
At the end there is a script that imports the revive function from main.js and islands from their own js files. Those imports are not prefixed with the basepath.
So the request is on the root and the js is not load which leads me to this error in the browser because my root application returns a 404 error page :
deno version : 1.36.1 deno fresh version : 1.6.5