-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Custom PageContext returns undefined
for all custom values
#1537
Comments
Hi @alycda |
Hi, I found the issue. This project is within an NX monorepo, so the command I used to run was |
By default, your server code isn't processed by Vite: issue#562 |
Yes, I read that comment at the top of the file and I did restart whenever changes were made but the custom page context items I added were always undefined, including a simple string. |
I'm sorry. The point is when you run the dev server, what script does it execute, if it's |
ah, I see. that file (index.ts) wasn't automagically executed by |
Description
Hi, I have followed the guides at https://vike.dev/pageContext#custom but the values I pass are ALWAYS undefined, server-side and client-side.
// +config.ts
terminal console output for
headers
andcookies
is undefined, as well as the console output in Browser DevTools. I have also tried adding a hardcoded string value and that also returns undefined.The text was updated successfully, but these errors were encountered: