next-markdown icon indicating copy to clipboard operation
next-markdown copied to clipboard

feat (advanced): split next-markdown into smaller modules

Open frouo opened this issue 2 years ago • 1 comments

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.

frouo avatar Mar 29 '22 11:03 frouo

option 2 🎉

edvincandon avatar Apr 05 '22 07:04 edvincandon