Open zirkelc opened 1 year ago
hi, thanks for the bug report! i think there was something wrong with the package description, I recently reworked it, could you check if it works for you now?
Also, rehype-parse
and rehype-notion
do not have a named export, the code should look like this (this works for me)
// @ts-check
import { unified } from 'unified'
import parse from 'rehype-parse'
import rehypeNotion from 'rehype-notion'
const html = `
<h1>Heading</h1>
<p>Paragraph</p>
`
const vfile = await unified()
.use(parse)
.use(rehypeNotion)
.process(html);
const notionBlocks = vfile.result
console.log(notionBlocks)
edit: just saw that you literally took the example out of the README, my bad! I will update it
I try to get
rehype-notion
to work, but always get the error:That's the JS code:
The package.json of
rehype-notion
seems to miss an export definition forimport
since its a ESM package. However, adding that export didn't solve the issue:It then fails with this error:
Any idea what might be wrong here?