mirror of
				https://github.com/r-freeman/portfolio.git
				synced 2025-11-04 00:51:12 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			926 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			926 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import nextMDX from '@next/mdx'
 | 
						|
import remarkGfm from 'remark-gfm'
 | 
						|
import rehypePrism from '@mapbox/rehype-prism'
 | 
						|
 | 
						|
/** @type {import('next').NextConfig} */
 | 
						|
const nextConfig = {
 | 
						|
    pageExtensions: ['jsx', 'js', 'tsx', 'ts', 'mdx'],
 | 
						|
    reactStrictMode: true,
 | 
						|
    swcMinify: true,
 | 
						|
    experimental: {
 | 
						|
        newNextLinkBehavior: true,
 | 
						|
        scrollRestoration: true
 | 
						|
    },
 | 
						|
    images: {
 | 
						|
        domains: ['i.scdn.co']
 | 
						|
    },
 | 
						|
    async rewrites() {
 | 
						|
        if (process.env.NODE_ENV === 'production') {
 | 
						|
            return [
 | 
						|
                {
 | 
						|
                    source: '/api/:path',
 | 
						|
                    destination: 'https://ryanfreeman.dev/:path/',
 | 
						|
                }
 | 
						|
            ]
 | 
						|
        } else {
 | 
						|
            return []
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
const withMDX = nextMDX({
 | 
						|
    extension: /\.mdx?$/,
 | 
						|
    options: {
 | 
						|
        remarkPlugins: [remarkGfm],
 | 
						|
        rehypePlugins: [rehypePrism],
 | 
						|
    }
 | 
						|
})
 | 
						|
 | 
						|
export default withMDX(nextConfig)
 |