Async Mode
Runtime compilation of content files.
Experimental
This feature is still experimental, use it under your own risk.
Introduction
By default, all Markdown and MDX files need to be pre-compiled first, the same constraint also applies on development server.
This may result in longer dev server start time for large docs sites, you can enable Async Mode on doc
collections to improve this.
Setup
Install required dependencies.
Enable Async Mode.
Usage
Async Mode allows on-demand compilation of Markdown and MDX content, by moving the compilation process from build time to Next.js runtime.
However, you need to invoke the load()
async function to load and compile content.
For example:
When using Async Mode, we highly recommend to use 3rd party services to implement search, which usually has a better capability to handle massive amount of content to index.
How is this guide?