v0.0.15: Fix SSR warning in client components

Removes misleading warning that appeared during Next.js SSR:
- Client components are initially rendered on server where window is undefined
- This is expected behavior and doesn't require a warning
- Now silently falls back to relative URLs during SSR
- Properly uses window.location.origin once hydrated on client

The hooks now work seamlessly in:
- Pure client-side apps
- Next.js with SSR/SSG
- Server components (with explicit serverURL)
- Client components (auto-detects after hydration)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-03 18:48:46 +02:00
parent 9bb5f4ecc8
commit 259599ddcc
2 changed files with 23 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@xtr-dev/payload-feature-flags",
"version": "0.0.14",
"version": "0.0.15",
"description": "Feature flags plugin for Payload CMS - manage feature toggles, A/B tests, and gradual rollouts",
"license": "MIT",
"type": "module",