Updates for tree shaking
Author: KingOfTacCreated May 12, 2024Updated Dec 23, 2024
Labelsbug
What happened?
Mark doc throws if React is not installed, even if the react renderer is not being used.
The renderers should be exported from a path other than the package’s main entry point so that non-react projects or projects using a custom renderer aren’t required to install React.
To reproduce
- Install markdoc
- Try to use the html renderer without React installed.
- Markdoc throws due to React not being present.
Version
Latest
Additional context
This is especially important so that projects not using React don’t end up with React accidentally bundled into their final output.
Source: markdoc/markdoc