Skip to content

Bump react-markdown to v10 - #524

Open
rootp1 wants to merge 1 commit into
containers:mainfrom
rootp1:bump-react-markdown-v10
Open

Bump react-markdown to v10#524
rootp1 wants to merge 1 commit into
containers:mainfrom
rootp1:bump-react-markdown-v10

Conversation

@rootp1

@rootp1 rootp1 commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Bumps react-markdown from v8 to v10, one of the outdated dependencies flagged in the Renovate Dependency Dashboard in #159. This one needed two real fixes, not just a version number change.

className prop removed

v10 no longer supports passing a className prop through to a wrapping element. The Markdown component (used in about 14 places across src for styled description text) relied on this. Fixed by wrapping ReactMarkdown in a plain div with the className in src/components/utilities/Markdown/index.tsx instead of passing it to the library.

Strict ESM breaks webpack

v10 ships as a strict ESM only package. Once installed, the dev server and production build both failed with Module not found: Error: Can't resolve react/jsx-runtime, because webpack's default fully specified ESM resolution rejects the extensionless internal import that the package uses. Fixed by adding a small esmInteropPlugin in docusaurus.config.js that sets resolve.fullySpecified to false for mjs and js files in the webpack config, which is the standard workaround for this class of error.

Test plan

Ran yarn build locally, confirmed it fails without the webpack fix and completes successfully with it.
Ran the dev server and visually confirmed the homepage description text (rendered through the Markdown component) still displays correctly styled and the page no longer crashes.

This needed two fixes. First, v10 removed support for the className
prop, so the Markdown component now wraps ReactMarkdown in a div with
the className instead of passing it through to the library. Second,
v10 ships as a strict ESM package, and its dynamic import broke
webpack's module resolution with a react/jsx-runtime not found error
under fully specified ESM rules. Added a small esm-interop Docusaurus
plugin that relaxes fullySpecified resolution for mjs and js files so
webpack can resolve it.

Signed-off-by: rootp1 <arnav.iitr@gmail.com>
@rootp1
rootp1 force-pushed the bump-react-markdown-v10 branch from a459de3 to ff8ebdf Compare July 25, 2026 14:29
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.

1 participant