Closed dylanalizon closed 4 weeks ago
@Fryuni do you think it's fixed by the global route priority flag?
@Fryuni do you think it's fixed by the global route priority flag?
I've just tested it, but it doesn't fix the problem.
I think the server islands route is being appended after the routes get sorted
Not only catch-all routes but also 2-level routes like /[team]/[user].astro
since that will match /_server-islands/ComponentName
in the final build that is being deployed, there is no route file for _server-islands...
i think that this is the reasong behind this problem, the file is missing, so requests to urls that start with "/_server-island" will be caught by the custom catch all routes of the project. Could have something to do with the adapter that performs the build transformations for the specific environment (cloudflare, vercel, ...)?
For example: Astro adds a route file for Actions, if you are using that feature: but no "/pages/server-islands/---path_.astro.mjs"
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
All requests from the server islands (/_server-islands/*) are caught by the catchall page ([...slug].astro). This works locally but when you run
npm run build
andnpm run preview
or deploy (tested on Vercel) server island requests are caught by the route.What's the expected result?
All server island requests (/_server-islands/*) must not be caught by the [...slug].astro page.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-wmamgi?file=astro.config.mjs
Participation