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
feat: check access for secret values on runtime configuration when dev #26441
base: main
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great idea! Thank you β€οΈ
However, I think as written it will warn when these keys are accessed on server side as well given that we are manipulating the config within the SSR renderer.
Maybe just warn on client side? (We could add the guard within the import.meta.client
block within app/nuxt
.)
SSR context is untouched. In fact, it exposes even more properties, specifically .nitro (which in my opinion makes more sense, let me know if this behaviour is not what you want) only SPA context is altered |
118bbc4
to
ed14aea
Compare
@danielroe when ssr: true the error is not triggered |
bump |
(This PR is waiting for a minor release - probably Nuxt v3.12. It has not been forgotten) |
π Linked issue
None
β Type of change
π Description
I wasted a bit too much time having trouble why server hydration and client view was different until I realized that I was accessing
useRuntimeConfig().<some prop>
in client as well. This would prevent future issues like thatπ Checklist