-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.mjs
43 lines (38 loc) · 955 Bytes
/
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
/** @type {import('next').NextConfig} */
import createMDX from '@next/mdx'
import remarkGfm from 'remark-gfm'
import rehypeSlug from 'rehype-slug'
const staticAssetsUrl = new URL(process.env.NEXT_PUBLIC_STATIC_ASSETS_URL)
const nextConfig = {
reactStrictMode: true,
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
pathname: '/u/**',
},
{
protocol: staticAssetsUrl.protocol.replace(':', ''),
hostname: staticAssetsUrl.hostname,
pathname: '/**',
},
],
},
redirects: async () => [
{
source:
'/:serviceIdOrSlug((?!api).*)/webhooks/:webhookId((?!new$)[a-z0-9.-]+)',
destination: '/:serviceIdOrSlug/webhooks/:webhookId/settings',
permanent: true,
},
],
}
const withMDX = createMDX({
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [rehypeSlug],
},
})
export default withMDX(nextConfig)