mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 09:11:38 +00:00
Add MDX
This commit is contained in:
@ -1,6 +1,20 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
const withMDX = require('@next/mdx')({
|
||||
extension: /\.mdx?$/,
|
||||
options: {
|
||||
remarkPlugins: [],
|
||||
rehypePlugins: [],
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = withMDX({
|
||||
reactStrictMode: true,
|
||||
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||
swcMinify: true,
|
||||
experimental: {
|
||||
// Native Node.js APIs are not supported in the Edge Runtime with `concurrentFeatures` enabled. Found `fs` imported.
|
||||
// concurrentFeatures: true,
|
||||
// serverComponents: true,
|
||||
},
|
||||
});
|
||||
|
@ -8,11 +8,15 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdx-js/loader": "^1.6.22",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@next/mdx": "^12.0.8",
|
||||
"next": "12.0.8",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mdx-js__react": "^1.5.5",
|
||||
"@types/node": "17.0.8",
|
||||
"@types/react": "17.0.38",
|
||||
"autoprefixer": "^10.4.2",
|
||||
|
@ -5,6 +5,7 @@ import { NextPage } from 'next';
|
||||
import { ReactElement, ReactNode } from 'react';
|
||||
import useRouterLoading from 'lib/hooks/useRouteLoading';
|
||||
import Head from 'next/head';
|
||||
import { MDXProvider } from '@mdx-js/react';
|
||||
|
||||
type NextPageWithLayout = NextPage & {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
|
Reference in New Issue
Block a user