diff --git a/next.mdx.compiler.mjs b/next.mdx.compiler.mjs index ac212548313b7..2025dddae3ed2 100644 --- a/next.mdx.compiler.mjs +++ b/next.mdx.compiler.mjs @@ -24,8 +24,8 @@ export async function compileMDX(source, fileExtension) { rehypePlugins: NEXT_REHYPE_PLUGINS, remarkPlugins: NEXT_REMARK_PLUGINS, format: fileExtension, - // This results on the minimal possible MDX parsed, and delegates - // another parser to actualy evaluate the MDX into JSX + // This instructs the MDX compiler to generate a minimal JSX-body + // to be consumed within MDX's `run` method, instead of a standalone React Application outputFormat: 'function-body', }); diff --git a/pages/[...path].tsx b/pages/[...path].tsx index 833fdd104f46f..55928a4607d86 100644 --- a/pages/[...path].tsx +++ b/pages/[...path].tsx @@ -95,7 +95,7 @@ export const getStaticPaths: GetStaticPaths = async () => { .filter(route => STATIC_ROUTES_IGNORES.every(e => !e(route))) .map(route => mapPathnameToRoute(route.routeWithLocale)); - paths = [...staticPaths, ...dynamicRoutes]; + paths = staticPaths.concat(dynamicRoutes); } return { paths: paths.sort(), fallback: 'blocking' };