Bump react-markdown to v10 - #524
Open
rootp1 wants to merge 1 commit into
Open
Conversation
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
force-pushed
the
bump-react-markdown-v10
branch
from
July 25, 2026 14:29
a459de3 to
ff8ebdf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.