Skip to content

Wrapping MDXComponents not working anymore #6

@scubamaggo

Description

@scubamaggo

I have noticed that once activating the theme, the extension I have done through wrapping MDXComponents is not picked up anymore.

That is, the example in the original documentation of docusaurus that shows how to extend the component scope via MDXComponent.js is not working correctly anymore.

import React from 'react';
// Import the original mapper
import MDXComponents from '@theme-original/MDXComponents';
import Highlight from '@site/src/components/Highlight';

export default {
  // Re-use the default mapping
  ...MDXComponents,
  // Map the "highlight" tag to our <Highlight /> component!
  // `Highlight` will receive all props that were passed to `highlight` in MDX
  highlight: Highlight,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions