Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental prerender does not work for dynamic routes #5661

Closed
1 task
bholmesdev opened this issue Dec 21, 2022 · 1 comment · Fixed by #5734
Closed
1 task

Experimental prerender does not work for dynamic routes #5661

bholmesdev opened this issue Dec 21, 2022 · 1 comment · Fixed by #5734
Assignees

Comments

@bholmesdev
Copy link
Contributor

What version of astro are you using?

1.7.1

Are you using an SSR adapter? If so, which one?

Node, also tested on Netlify serverless

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

I add export const prerender = true to a dynamic route and expect getStaticPaths to be respected. Actual behavior:

  • Dev: warning log that getStaticPaths will be ignored with output: 'server', getStaticPaths does not run
  • Prod: Internal error on prependForwardSlash

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-rnb4zu?file=src%2Fpages%2Findex.astro,astro.config.mjs,src%2Fpages%2F%5Bslug%5D.astro

Participation

  • I am willing to submit a pull request for this issue.
@juanmiguelguerrero
Copy link
Contributor

Please... someone to merge this PR. Thanks...

natemoo-re added a commit that referenced this issue Jan 4, 2023
* fix(#5661): ensure getStaticPaths is correctly handled for prerendered pages

* test: add prerender getStaticPaths cases

* chore: add changeset

* test: add props to test suite

* chore: update lockfile

Co-authored-by: Nate Moore <nate@astro.build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants