-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathnext.config.mjs
70 lines (66 loc) · 1.9 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import remarkGfm from 'remark-gfm';
import createMDX from '@next/mdx';
import { withAxiom } from 'next-axiom';
import rehypeHighlight from 'rehype-highlight';
const withMDX = createMDX({
options: {
extension: /\.mdx?$/,
remarkPlugins: [remarkGfm],
rehypePlugins: [rehypeHighlight],
// If you use `MDXProvider`, uncomment the following line.
// providerImportSource: "@mdx-js/react",
},
});
const headers = [
{
key: 'X-DNS-Prefetch-Control',
value: 'on',
},
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
];
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
mdxRs: false,
},
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
reactStrictMode: false,
output: 'standalone',
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
async headers() {
return [
{
source: '/:path*',
headers,
},
];
},
async rewrites() {
return [
{ source: '/docs', destination: '/docs/index' },
{ source: '/docs/getting-started', destination: '/docs/index' },
{ source: '/a/script.js', destination: 'https://tracker-script.umami.dev/' },
{ source: '/discord', destination: 'https://discord.gg/4dz4zcXYrQ' },
{ source: '/analytics', destination: '/lp/analytics' },
{ source: '/website-analytics', destination: '/lp/website-analytics' },
{
source: '/open-source-website-analytics',
destination: '/lp/open-source-website-analytics',
},
{ source: '/privacy-analytics', destination: '/lp/privacy-analytics' },
{ source: '/linkedin', destination: '/lp/linkedin' },
{ source: '/reddit', destination: '/lp/reddit' },
{ source: '/apollo', destination: '/lp/apollo' },
{ source: '/apollo-ga', destination: '/lp/google-analytics' },
];
},
};
export default withAxiom(withMDX(nextConfig));