You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
bluwy
changed the title
Pages with dinamic routes in the same folder don't work in @2.0.0-beta.2
[Prerender] Pages with dynamic routes in the same folder don't work in @2.0.0-beta.2
Jan 16, 2023
This looks like a problem with the way the Netlify adapter is generating the _redirects file. We should be generating a single redirect for each .html file that is prerendered rather than each route that is prerendered.
I don't quite understand what's the desired output though, but I feel like the two latter redirects should be removed?
Also it doesn't seem like this is a build-only issue. During dev, the dogs page will always use the cats Astro files to render since Astro's routing is first-match (IIRC) via the filename-as-regex, and the geStaticPaths is only considered later 🤔
What version of
astro
are you using?2.0.0-beta.2
Are you using an SSR adapter? If so, which one?
Netlify
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
If we have more than one page with dinamic routes in the same folder we get an error.
I have created 2 pages with getStaticPatch [cat].astro and [dog].astro (and prerender = true).
All dog routes doesn't works...
And if you input any route then cat page will appear... never enter in the dog page.
Demo: https://stackblitz.com/github/juanmiguelguerrero/astro-prerender-staticpaths-beta2
If you take out the Netlify adapter configuration... everything works fine.
Link to Minimal Reproducible Example
https://stackblitz.com/github/juanmiguelguerrero/astro-prerender-staticpaths-beta2
Participation
The text was updated successfully, but these errors were encountered: