Skip to content
This repository was archived by the owner on Apr 9, 2026. It is now read-only.

Releases: hashicorp/next-mdx-remote

v6.0.0

12 Feb 00:18

Choose a tag to compare

Breaking/Major Changes

v5.0.0

22 May 18:36

Choose a tag to compare

Major Changes

  • #448 67a221f Thanks @dstaley! - Update to MDX v3 and add support for React 19. Fix various TypeScript errors. Remove usage of Rollup.

v4.4.1

01 Mar 19:08

Choose a tag to compare

What's Changed

Full Changelog: v4.4.0...v4.4.1

v4.4.0

28 Feb 15:43

Choose a tag to compare

This release includes a few fixes for frontmatter types, as well as a way to provide a frontmatter type to serialize or compileMDX and have it propagate through to the returned frontmatter property. See the documentation for an example.

serialize:

import { serialize } from 'next-mdx-remote/serialize'

interface Frontmatter {
  title: string
  published: string
  description?: string
}

//     πŸ‘‡ should have type Frontmatter
const { frontmatter } = serialize<Record<string, unknown>, Frontmatter>(source)

compileMDX:

import { compileMDX } from 'next-mdx-remote/rsc'

interface Frontmatter {
  title: string
  published: string
  description?: string
}

export default async function Page({ source }) {
	//              πŸ‘‡ should have type Frontmatter
	const { content, frontmatter } = await compileMDX<Frontmatter>(source)

	return (
		<>
			<h1>{frontmatter.title}</h1>
			{content}
		</>
	)
}

What's Changed

  • docs: fix react server components example by @Greyhere in #334
  • fix(rsc): do not require compiledSource in types by @brkalow in #339
  • fix: TFrontmatter type to unknown by @RebootGG in #340
  • remove newline from template literal by @chrisweb in #346
  • feat: Improve frontmatter types, pass generic TFrontmatter type through by @brkalow in #342

New Contributors

Full Changelog: v4.3.0...v4.4.0

v4.3.0 - Server Components Support (experimental)

20 Jan 18:05

Choose a tag to compare

next-mdx-remote now has experimental support for React Server Components! πŸŽ‰ Access the new API by importing from next-mdx-remote/rsc, and head to the documentation for usage instructions and additional examples.

import { MDXRemote } from 'next-mdx-remote/rsc'

export default async function Page() {
  const mdxSource = await getContent()

  return (
    <MDXRemote source={mdxSource} />
  )
}

Big thanks to @timneutkens for his contribution!


What's Changed

New Contributors

Full Changelog: v4.2.1...v4.3.0

v4.2.1

05 Jan 16:41

Choose a tag to compare

What's Changed

  • Fix: export jsx-dev-runtime in development mode by @imtsuki in #323

New Contributors

Full Changelog: v4.2.0...v4.2.1

v4.2.0

07 Nov 05:20

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.1.0...v4.2.0

v4.1.0

20 Jul 22:42

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.0.3...v4.1.0

v4.0.3

27 Apr 13:42

Choose a tag to compare

What's Changed

  • Improved typing of the frontmatter prop. by @MatthijsMud in #252
  • fix: support both react 17 and react 18 jsx-runtime imports by @brkalow in #267

New Contributors

Full Changelog: v4.0.2...v4.0.3

v4.0.1

25 Mar 17:31

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.0.0...4.0.1