-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
55 lines (50 loc) · 1.18 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
43
44
45
46
47
48
49
50
51
52
53
54
55
import remarkGfm from 'remark-gfm'
import { default as nextPWA } from 'next-pwa'
import NextBundleAnalyzer from '@next/bundle-analyzer'
import nextMDX from '@next/mdx'
const withPWA = nextPWA({
dest: 'public',
sw: '/sw.js',
disable: process.env.NODE_ENV === 'development',
cacheOnFrontEndNav: true,
})
const withBundleAnalyzer = NextBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})
const withMDX = nextMDX({
remarkPlugins: [remarkGfm],
})
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
typedRoutes: true,
nextScriptWorkers: true,
mdxRs: true,
},
reactStrictMode: true,
images: {
domains: [
'*.googleusercontent.com',
'raw.githubusercontent.com',
'avatars.githubusercontent.com',
],
},
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
async redirects() {
return [
{
source: '/releases',
destination: '/',
permanent: true,
},
{
source: '/settings',
destination: '/settings/admin',
permanent: true,
},
]
},
swcMinify: true,
output: 'standalone',
}
export default withBundleAnalyzer(withPWA(withMDX(nextConfig)))