portfolio/next.config.mjs

36 lines
794 B
JavaScript
Raw Normal View History

2022-12-06 12:54:34 +00:00
import nextMDX from '@next/mdx'
import remarkGfm from 'remark-gfm'
import rehypePrism from '@mapbox/rehype-prism'
/** @type {import('next').NextConfig} */
const nextConfig = {
2023-01-14 19:31:05 +00:00
pageExtensions: ['jsx', 'js', 'tsx', 'mdx'],
2022-12-06 12:54:34 +00:00
reactStrictMode: true,
swcMinify: true,
experimental: {
newNextLinkBehavior: true,
2023-01-14 19:31:05 +00:00
scrollRestoration: true
2022-12-06 12:54:34 +00:00
},
images: {
domains: ['i.scdn.co']
},
async rewrites() {
return [
{
source: '/api/:path',
destination: 'https://ryanfreeman.dev/:path/',
}
]
}
}
const withMDX = nextMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [rehypePrism],
2023-01-14 19:31:05 +00:00
}
2022-12-06 12:54:34 +00:00
})
export default withMDX(nextConfig)