-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.ts
More file actions
135 lines (133 loc) · 3.75 KB
/
next.config.ts
File metadata and controls
135 lines (133 loc) · 3.75 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Bundler-agnostic polling interval for file watching — works with both
// Turbopack (default in Next 15) and Webpack. Needed because the native
// file watcher doesn't pick up changes reliably in git worktrees.
watchOptions: {
pollIntervalMs: 1000,
},
webpack: (config) => {
// Additional Webpack-specific watch tweaks for git worktree symlinks
// (only takes effect when Turbopack is disabled).
config.watchOptions = {
...config.watchOptions,
followSymlinks: true,
poll: 1000,
aggregateTimeout: 300,
};
return config;
},
async redirects() {
return [
// Old livepeer.org routes → new site equivalents
{
source: "/lpt",
destination: "/token",
permanent: true,
},
{
source: "/learn",
destination: "/primer",
permanent: false,
},
{
source: "/network",
destination: "https://explorer.livepeer.org",
permanent: false,
},
{
source: "/delegate",
destination: "https://explorer.livepeer.org/",
permanent: false,
},
{
source: "/orchestrate",
destination:
"https://docs.livepeer.org/v1/orchestrators/guides/get-started",
permanent: false,
},
{
source: "/dev-hub",
destination: "https://docs.livepeer.org",
permanent: false,
},
{
source: "/community-hub",
destination: "https://discord.gg/livepeer",
permanent: false,
},
{
source: "/jobs",
destination: "/",
permanent: false,
},
{
source: "/media-kit",
destination: "/brand",
permanent: true,
},
{
source: "/primer-new-design",
destination: "/primer",
permanent: true,
},
// Legal pages — not yet implemented, redirect to home for now
{
source: "/terms-of-service",
destination: "/",
permanent: false,
},
{
source: "/privacy-policy",
destination: "/",
permanent: false,
},
{
source: "/terms-of-service-p",
destination: "/",
permanent: false,
},
{
source: "/privacy-policy-p",
destination: "/",
permanent: false,
},
// blog.livepeer.org → livepeer.org/blog (path-preserving catch-all)
{
source: "/:path*",
has: [{ type: "host", value: "blog.livepeer.org" }],
destination: "https://livepeer.org/blog/:path*",
permanent: true,
},
// Renamed blog slugs — old name → new name.
// Matched with and without /blog/ prefix so they work both from
// the catch-all above and from any cached bare-path links.
...["", "/blog"].flatMap((prefix) => [
{
source: `${prefix}/ai-x-open-media-forum-building-new-wave-creativity`,
destination: "/blog/ai-x-open-media-forum",
permanent: true,
},
{
source: `${prefix}/livepeer-onchain-builders-streamplace-building-the-video-backbone-of-decentralized-social`,
destination: "/blog/onchain-builders-streamplace",
permanent: true,
},
]),
// Deprecated pages — old marketing/campaign routes, redirect to home
// to avoid 404s from existing links and search engine indexes
...[
"/pipelines-demo-email",
"/comfyui-live-video-hacker-program",
"/learn-about-pipelines",
"/learn-about-pipelines---dev",
"/daydream-waitlist",
].map((source) => ({
source,
destination: "/",
permanent: true,
})),
];
},
};
export default nextConfig;