Fix CreateRoot <3 - #192
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
It changes runtime module discovery and code transformation behavior against externally-fetched/minified bundles, which is hard to validate safely without running the app in real Tidal environments.
Pull request overview
This PR adjusts how Luna resolves react-dom/client in the Tidal-render environment by loosening the ReactDOM module detection and adding a runtime fallback to createRoot when Tidal’s bundling/tree-shaking removes expected exports.
Changes:
- Update
react-dom/clientmodule resolution to no longer requirehydrateRootand to match bothreact-dom-*andreact-dom-client-*chunk names. - Add a fallback
react-dom/clientshim that exposescreateRootvia a global tag (globalThis.__lunaCreateRoot) when direct resolution fails. - Bump package version from
1.16.4-betato1.16.5-beta.
File summaries
| File | Description |
|---|---|
| render/src/modules.ts | Updates ReactDOM client resolution and adds a createRoot fallback shim. |
| render/src/exposeTidalInternals.ts | Injects a transform to tag createRoot into a global for fallback resolution. |
| package.json | Version bump for the release containing this fix. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Flake Review Results for #192Available systems: aarch64-darwin, aarch64-linux, armv6l-linux, armv7l-linux, i686-linux, powerpc64le-linux, riscv64-linux, x86_64-darwin, x86_64-freebsd, x86_64-linux 🔄 Modified (2)
Generated by flake-review |
i'm pushing to Master simply because Dev look insanely out of date.. so idk <3