forked from e2b-dev/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
60 lines (57 loc) · 1.29 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
import { createMDX } from 'fumadocs-mdx/next'
const withMDX = createMDX()
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
experimental: {
reactCompiler: true,
reactOwnerStack: true,
ppr: true,
staleTimes: {
dynamic: 180,
static: 180,
},
},
trailingSlash: false,
headers: async () => [
{
source: '/:path*',
headers: [
{
// config to prevent the browser from rendering the page inside a frame or iframe and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
],
},
],
rewrites: async () => [
{
source: '/ingest/static/:path*',
destination: 'https://us-assets.i.posthog.com/static/:path*',
},
{
source: '/ingest/:path*',
destination: 'https://us.i.posthog.com/:path*',
},
{
source: '/ingest/decide',
destination: 'https://us.i.posthog.com/decide',
},
],
skipTrailingSlashRedirect: true,
typescript: {
ignoreBuildErrors: true,
},
logging: {
level: 'info',
detailed: true,
},
images: {
domains: [
// Add your image domains here if needed
],
},
productionBrowserSourceMaps: true,
}
export default withMDX(config)