Fix Yjs WebSocket in dev mode
- Add Vite plugin implementing y-protocols sync server for dev mode - Fix useYjs hook: move provider creation into useEffect to survive React StrictMode remounts - Fix WebSocket URL: use /sync as base (y-websocket appends room name) - Verified in browser: Connected status, Host badge, awareness working Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
49e9d589b1
commit
230094b956
5 changed files with 151 additions and 21 deletions
|
|
@ -21,10 +21,12 @@
|
|||
"@trails-cool/ui": "workspace:*",
|
||||
"drizzle-orm": "catalog:",
|
||||
"isbot": "^5.1.0",
|
||||
"lib0": "^0.2.117",
|
||||
"react": "catalog:",
|
||||
"react-dom": "catalog:",
|
||||
"react-router": "catalog:",
|
||||
"ws": "^8.20.0",
|
||||
"y-protocols": "^1.0.7",
|
||||
"y-websocket": "^3.0.0",
|
||||
"yjs": "^13.6.30"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue