Set posthog runtimeConfig defaults (follow-up to #429)#430
Conversation
PR #429 set the module-level posthog.publicKey but runtimeConfig.public.posthog still defaulted to empty strings, which override the module config at runtime when Vercel env vars are unset. Result: deployed __NUXT__.config.public.posthog showed publicKey:'' and the client never initialized. Set the same public phc_ key here so both layers agree.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughUpdated PostHog analytics configuration in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow-up to #429.
#429 added the public key to the module-level
posthog:block, butruntimeConfig.public.posthogstill defaulted to empty strings. At runtime those empty strings override the module config when Vercel env vars aren't set, so the deployed__NUXT__.config.public.posthogshowspublicKey:""and PostHog never initializes.Set the same public
phc_key in runtimeConfig so both layers agree.Verified after #429 deployed:
curl https://v4.wedance.vip/ | grep posthogshowspublicKey:"". This PR fixes that.Summary by CodeRabbit