-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
42 lines (38 loc) · 1.11 KB
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import nextMdx from '@next/mdx'
import remarkGfm from 'remark-gfm'
import nextAnalyzer from '@next/bundle-analyzer'
/** @type {import('next').NextConfig} */
const nextConfig = {
// Configure `pageExtensions` to include MDX files
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
async redirects() {
return [
{
source: '/font-converter',
destination: '/tools/font-converter',
permanent: true,
},
{
source: '/svg-to-css',
destination: '/tools/svg-to-base64',
permanent: true,
},
]
},
}
const withBundleAnalyzer = nextAnalyzer({
enabled: process.env.ANALYZE === 'true',
})
const withMDX = nextMdx({
// Optionally provide remark and rehype plugins
options: {
// If you use remark-gfm, you'll need to use next.config.mjs
// as the package is ESM only
// https://github.com/remarkjs/remark-gfm#install
remarkPlugins: [remarkGfm],
rehypePlugins: [],
// If you use `MDXProvider`, uncomment the following line.
// providerImportSource: "@mdx-js/react",
},
})
export default withBundleAnalyzer(withMDX(nextConfig))