-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnext.config.mjs
More file actions
113 lines (109 loc) · 3.24 KB
/
Copy pathnext.config.mjs
File metadata and controls
113 lines (109 loc) · 3.24 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { createMDX } from "fumadocs-mdx/next";
const __dirname = dirname(fileURLToPath(import.meta.url));
const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
experimental: {
optimizePackageImports: ["@phosphor-icons/react", "lucide-react"],
},
turbopack: {
root: __dirname,
},
// Reverse proxy for PostHog to avoid ad blockers
async rewrites() {
return [
{
source: "/ingest/static/:path*",
destination: "https://us-assets.i.posthog.com/static/:path*",
},
{
source: "/ingest/:path*",
destination: "https://us.i.posthog.com/:path*",
},
];
},
async redirects() {
return [
{
source: "/docs",
destination: "/",
permanent: false,
},
{
source: "/docs/da/concepts/networks",
destination: "/docs/da/build/networks",
permanent: true,
},
{
source: "/docs/nexus/nexus-ui-elements/mcp-documentation",
destination: "/docs/nexus/nexus-ui-elements/mcp-and-agent-skills",
permanent: true,
},
// Legacy end-user-guide paths
{
source: "/docs/end-user-guide/vectorx",
destination: "/docs/da/user-guides/bridge-avail/avail-ethereum",
permanent: true,
},
// Legacy Nexus redirects (v1.5.0 restructure)
{
source: "/docs/nexus/nexus-overview",
destination: "/docs/nexus/get-started",
permanent: true,
},
{
source: "/docs/nexus/nexus-examples",
destination: "/docs/nexus/nexus-sdk/examples",
permanent: true,
},
{
source: "/docs/nexus/nexus-examples/:slug*",
destination: "/docs/nexus/nexus-sdk/examples/:slug*",
permanent: true,
},
{
source: "/docs/nexus/nexus-quickstart",
destination: "/docs/nexus/nexus-sdk/quickstart",
permanent: true,
},
{
source: "/docs/nexus/nexus-quickstart/nexus-core",
destination: "/docs/nexus/nexus-sdk/quickstart",
permanent: true,
},
{
source: "/docs/nexus/nexus-quickstart/nexus-elements",
destination: "/docs/nexus/nexus-sdk/nexus-elements",
permanent: true,
},
{
source: "/docs/nexus/nexus-quickstart/nexus-elements/:slug*",
destination: "/docs/nexus/nexus-ui-elements/components/:slug*",
permanent: true,
},
// Skip-to-quickstart: SDK section lands directly on quickstart
{
source: "/docs/nexus/nexus-sdk",
destination: "/docs/nexus/nexus-sdk/quickstart",
permanent: false,
},
// Skip-to-first-child: reference sections land directly on first method
{
source: "/docs/nexus/nexus-sdk/reference/bridge-methods",
destination:
"/docs/nexus/nexus-sdk/reference/bridge-methods/fetch-bridge-balances",
permanent: false,
},
{
source: "/docs/nexus/nexus-sdk/reference/swap-methods",
destination:
"/docs/nexus/nexus-sdk/reference/swap-methods/fetch-swap-balances",
permanent: false,
},
];
},
};
export default withMDX(config);