Skip to content

fix: add react-dom support.#124

Merged
knightedcodemonkey merged 1 commit intomainfrom
bananas
May 2, 2026
Merged

fix: add react-dom support.#124
knightedcodemonkey merged 1 commit intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 2, 2026 23:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class react-dom module support to the preview runtime so workspace code can import from react-dom (in addition to the existing react-dom/client) while keeping runtime specifier resolution and module preloading consistent across CDN providers.

Changes:

  • Adds a reactDom runtime specifier and wires it into the preview render runtime controller.
  • Rewrites react-dom imports in virtual workspace modules to the resolved runtime URL/specifier.
  • Adds CDN import specs + preload entry for react-dom, and documents preview root lifecycle behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/modules/preview/render-runtime.js Includes reactDom in the runtime specifier set passed into the iframe preview execution flow.
src/modules/preview-runtime/virtual-workspace-modules.js Adds import rewrite support for react-dom so workspace imports resolve correctly.
src/modules/cdn.js Defines reactDom in cdnImportSpecs for import map / esm / jspm providers.
src/bootstrap.js Preloads react-dom alongside existing core runtime + React runtime modules.
docs/preview-root-lifecycle.md New documentation explaining when/why <knighted-preview-root> is created/removed during preview renders.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@knightedcodemonkey knightedcodemonkey merged commit ed0e1f7 into main May 2, 2026
10 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch May 2, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants