Skip to content

Commit

Permalink
Fix rehype-slug
Browse files Browse the repository at this point in the history
  • Loading branch information
timolins committed Jul 9, 2022
1 parent 1db73e1 commit a21848a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions site/next.config.js → site/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const remarkSlugs = import('rehype-slug');
import rehypeSlug from 'rehype-slug';
import nextMdx from '@next/mdx';
import withPlugins from 'next-compose-plugins';

const withMDX = require('@next/mdx')({
const withMDX = nextMdx({
extension: /.mdx?$/,
options: {
rehypePlugins: [remarkSlugs],
rehypePlugins: [rehypeSlug],
providerImportSource: '@mdx-js/react',
},
});
const withPlugins = require('next-compose-plugins');

const withSvgr = (nextConfig = {}, nextComposePlugins = {}) => {
return Object.assign({}, nextConfig, {
Expand All @@ -26,7 +27,7 @@ const withSvgr = (nextConfig = {}, nextComposePlugins = {}) => {
});
};

module.exports = withPlugins(
export default withPlugins(
[
withMDX({
pageExtensions: ['ts', 'tsx', 'md', 'mdx'],
Expand Down

0 comments on commit a21848a

Please sign in to comment.