The vendored React bundle
What React is in devpage — React and react-dom bundled into one file that widgets run with in the browser — where it came from, its version and licence, how devpage serves it, and how to upgrade it. It is a mechanism page under the viewer, for someone about to replace the bundle; how to write a widget is in Widgets.
What is in the repository
| File | What it is |
|---|---|
assets/vendor/react.js |
React and react-dom 19.3.0, production builds, bundled into one minified ES module (about 221 KB). |
assets/vendor/react.LICENSE |
Their licence: MIT, copyright Meta Platforms, Inc. and affiliates. |
The bundle is built from the npm packages react@19.3.0 and
react-dom@19.3.0 (published 2026-09-09) with this entry module:
import * as React from "react";
export * from "react";
export default React;
export from "react/jsx-runtime";
export from "react-dom/client";
How devpage uses it
src/server.rs compiles the file into the binary with include_str! and
serves it at /__devpage/react.js — see
built-in assets. Every page's
import map points react, react/jsx-runtime and react-dom/client at it,
so compiled widgets — whose JSX becomes react/jsx-runtime calls — and the page
script's mounting code share one copy of React
(Widgets).
Upgrading it
-
Build the new bundle In a scratch folder outside the repository, with Bun, using
entry.jsas above. Building 19.3.0 this way with Bun 1.4.2 reproduces the vendored file byte for byte.$ npm install react@
react-dom@ $ bun build entry.js --minify --target browser --format esm --define 'process.env.NODE_ENV="production"' --outfile react.js -
Replace the files
react.js, andreact.LICENSEfrom the package'sLICENSE. -
Rebuild devpage and run the widget tests Including the ones that drive Chrome.
$ cargo test $ cargo test -- --ignored
-
Update this page's version and size