Closed yunesco closed 2 years ago
Version 8.0 was a breaking change. You have to change your code to pass the source
as part of the object sent to bundleMDX. Simple change - like following
const { code, frontmatter } = await bundleMDX({
source: source,
xdmOptions(options) {
options.rehypePlugins = [
...(options?.rehypePlugins ?? []),
@kamroot That fixed it, thanks!
If that is what you want to do, I'd just import the other mdx file from your original mdx file. For example from content/books/index.mdx
you can import content/blogs/index.mdx
(an example, obviously).
mdx-bundler
version: 8.0.1node
version: v16.14.0npm
version: 8.3.1Relevant code or config
What you did: this code works fine on mdx-bundler 7.0.0 but when i upgrade to the latest version i get the error below
Reproduction repository:
Problem description:
Suggested solution: I am not sure whats the solution