Skip to content

react-live-ssr transpiles with the classic JSX runtime — 104 React warnings across the docs site #3017

Description

@mfal

Every docs page with a live code example logs:

Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance.

104 of the 113 docs pages. It is the single loudest warning in the docs app.

Cause

@mfalkenberg/react-live-ssr@4.1.7 transpiles example code with sucrase and leaves jsxRuntime at its default. Sucrase's classic mode emits React.createElement(type, { __self, __source, … }), and React 19 warns exactly on a config that carries __self without key (react.development.js, createElement).

dist/index.mjs:

return (code) => _transform(code, { transforms }).code;

Verified fix

Adding production: true makes sucrase drop __self/__source and the warning disappears — confirmed by patching the installed copy and reloading the docs:

return (code) => _transform(code, { transforms, production: true }).code;

jsxRuntime: "automatic" would also silence it but is riskier: react-live evaluates the transpiled code with only React in scope, so _jsx would need a runtime import the sandbox does not provide. production: true keeps the classic call shape.

Getting it into the repo

The fix lives upstream in @mfalkenberg/react-live-ssr. A release cannot be consumed immediately — pnpm's minimumReleaseAge is one week and exempts only @mittwald/* — so a patches/ entry is the bridge if we want the docs console clean before then.

Found while clearing the warnings in #3019.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions