npm install @nextmarkdown/core : contains everything but the markdownToHtml logic (commonjs lib)
npm install @nextmarkdown/markdown-to-html : will contain all the logic to convert markdown to html with remark / rehype plugins dependencies (esm module lib because rehype-stringify is ESM only).
npm install @nextmarkdown/mdx : will contain the next-mdx-remote logic.
Finally npm install next-markdown would install, by default, both @nextmarkdown/core and @nextmarkdown/markdown-to-html so it is really easy to get started with next-mardown + covers 80% of the usage cases.
Split the lib in several parts
npm install @nextmarkdown/core
: contains everything but the markdownToHtml logic (commonjs lib)npm install @nextmarkdown/markdown-to-html
: will contain all the logic to convert markdown to html with remark / rehype plugins dependencies (esm module lib because rehype-stringify is ESM only).npm install @nextmarkdown/mdx
: will contain the next-mdx-remote logic.Finally
npm install next-markdown
would install, by default, both @nextmarkdown/core and @nextmarkdown/markdown-to-html so it is really easy to get started with next-mardown + covers 80% of the usage cases.