Deployed on Netlify, having an +onBeforeRender
for a SPA dynamic pages leads to an error
#1389
Replies: 2 comments 17 replies
-
It seems that you're using a very old example (vite-plugin-ssr) with deprecated API design. Please you should try to migrate to the latest Vike version with V1 Design. You can see migration guide. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I wouldn't know how this could be related to Vike. I'm inclined to think it's some kind of user land quirk. |
Beta Was this translation helpful? Give feedback.
16 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some dynamic pages, like
path/@index
. I used this repo as an example to set up my deployment. It's partially prerendered, and partially rendered on request.meta
for the dynamic pages contains{ Page: { client: true } }
.In the
+onBeforeRender
hook I run a quick data check, testing if the url with the@item
exists so I can throw an error page in case it doesn't.It works well, while I dev locally, but on Netlify it throws a 404 error.
Interesting thing is that the contents of the
+onBeforeRender
don't matter. I made it an empty function and it still failed. Removing the+onBeforeRender
file fixes it, I can access these pages. That's what I did as a temporary fix.How can I try to debug/fix this?
Beta Was this translation helpful? Give feedback.
All reactions