rehype plugin to JSX.
npm install rehype-jsx
import rehype from 'rehype'
import rehypeJsx from 'rehype-jsx'
rehype()
.data('settings', { fragment: true })
.use(rehypeJsx)
.process('<div>Hello World</div>')
.then(({ value }) => {
console.log(value) // <><div>{"Hello World"}</div></>;
})
MIT