-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
66 lines (63 loc) · 1.6 KB
/
next.config.mjs
File metadata and controls
66 lines (63 loc) · 1.6 KB
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
import { createMDX } from "fumadocs-mdx/next";
const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
basePath: "/docs",
reactStrictMode: true,
async redirects() {
return [
// Old URLs without /stack/ prefix
{
source: "/encryption/:path*",
destination: "/stack/encryption/:path*",
permanent: false,
},
{
source: "/platform/:path*",
destination: "/stack/platform/:path*",
permanent: false,
},
// Old nested supported-queries paths
{
source: "/stack/platform/searchable-encryption/supported-queries/:path*",
destination: "/stack/platform/supported-queries",
permanent: false,
},
// Reference section index → latest
{
source: "/stack/reference/stack",
destination: "/stack/reference/stack/latest",
permanent: false,
},
];
},
async rewrites() {
return {
beforeFiles: [
{
source: "/stack/:path*.mdx",
destination: "/llms.mdx/stack/:path*",
},
],
afterFiles: [
{
source: "/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/ingest/decide",
destination: "https://us.i.posthog.com/decide",
},
{
source: "/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
],
fallback: [],
};
},
experimental: {
turbopackFileSystemCacheForDev: true,
},
};
export default withMDX(config);