Skip to content

v4.0.0-rc.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@BRKalow BRKalow released this 10 Dec 18:28
· 63 commits to main since this release

next-mdx-remote has been upgraded to use MDX v2 under the hood, which comes with improved performance and a whole list of other enhancements. Due to the improved code generated from MDX, we've also been able to remove our usage of esbuild. If you're using Next v12, no changes should be required to upgrade! Users on Next v11.1 might need to set experimental: { esmExternals: true } in next.config.js.

Note that some of the underlying changes in MDX v2 may require you to adjust some of your MDX content or custom components.

Take it for a spin and let us know if you run into any issues. 🙏

$ npm install next-mdx-remote@next

Breaking Changes

  • Exposes ESM
  • Upgrade to MDX v2 under the hood, see the blog post for more information
  • Remove esbuild integration

Features

  • Optional frontmatter parsing by passing { parseFrontmatter: true } to serialize(). Frontmatter is then available in your MDX:
    # {frontmatter.page_title}
    
    Hello world!
  • Improved error messages when MDX fails to compile:
    Screen Shot 2021-12-10 at 12 04 04 PM

Full Changelog: 3.0.7...v4.0.0-rc.1