upgrade nextjs, preact, mdx-bundler, esbuild

This commit is contained in:
Timothy Lin
2021-12-04 16:56:54 +08:00
parent 4b30668f74
commit 1789efadc9
6 changed files with 2490 additions and 2049 deletions

View File

@ -56,7 +56,8 @@ export async function getFileBySlug(type, slug) {
// Parsing frontmatter here to pass it in as options to rehype plugin
const { data: frontmatter } = matter(source)
const { code } = await bundleMDX(source, {
const { code } = await bundleMDX({
source,
// mdx imports can be automatically source from the components directory
cwd: path.join(root, 'components'),
xdmOptions(options) {