Repository navigation
Conversation
TransitionSeries imports createPortal from react-dom since 4.0.531, and without the external Bun inlined react-dom 19.2.3 into dist/esm, which fails to bundle on React 18. Fixes remotion-dev#12186 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Mark
react-domexternal in the ESM build — adds'react-dom'to theexternallist inpackages/transitions/bundle.ts:43, soTransitionSeries.tsx'screatePortalimport is no longer inlined from the monorepo's React 19 install.
The change is correct and matches the established convention: core, media, studio, design, shapes, and nearly every other package already list react-dom as external. react-dom is already declared as a peerDependency (>=16.8.0), and the CJS build already emitted require('react-dom'), so ESM and CJS now resolve the user's own react-dom consistently. Only react-dom is imported from package source (TransitionSeries.tsx:3); the react-dom/client and react-dom/server imports live in src/test/, which is not a bundle entrypoint, so no additional external entry is needed.
deepseek-v4.1-flash | 𝕏
|
The one failing check, |
|
Superseded by #12193, which landed the same change. Thanks for the quick fix! |

Fixes #12186.
Since 4.0.531,
TransitionSeries.tsximportscreatePortalfromreact-dom(#11841).packages/transitions/bundle.tsdidn't listreact-domasexternal, so Bun inlined the monorepo's react-dom 19.2.3 intodist/esm/index.mjs. In a React 18 project, bundling then fails withexport '__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE' … was not found in 'react'. This adds'react-dom'toexternal, as@remotion/media,@remotion/studioandremotionalready do.react-domis already a peer dependency of@remotion/transitions.Verified by running
NODE_ENV=production bun bundle.ts(Bun 1.3.3) inpackages/transitions:react-domin order to inline it (Could not resolve: "react-dom"in a checkout without dependencies).dist/esm/index.mjscontainsimport { createPortal } from "react-dom";and no__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.The same change, applied as a patch to the published 4.0.534 ESM build, bundles and renders a React 18.3.1 project again.
Trade-offs: none that I can see. The CJS build already did
require("react-dom"), so ESM and CJS now resolve the same react-dom, the user's own.