-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
49 lines (47 loc) · 1.47 KB
/
Copy pathnext.config.ts
File metadata and controls
49 lines (47 loc) · 1.47 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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
experimental: {
optimizePackageImports: ["@fluentui/react-icons"],
},
serverExternalPackages: ["applicationinsights"],
async redirects() {
return [
// Permanent redirects: old /blog and intermediate /insights routes
// both resolve to the current /why-spaarke section. Preserves SEO
// and inbound links across the two renames.
{
source: "/blog",
destination: "/why-spaarke",
permanent: true,
},
{
source: "/blog/:slug*",
destination: "/why-spaarke/:slug*",
permanent: true,
},
{
source: "/insights",
destination: "/why-spaarke",
permanent: true,
},
{
source: "/insights/:slug*",
destination: "/why-spaarke/:slug*",
permanent: true,
},
// Print-campaign QR landing slots. Each /go/<code> is printed on
// physical media, so the path must never 404. Until a real landing
// page exists at the route, it temporarily redirects to the
// homepage. permanent: false is required — a cached 308 would keep
// sending visitors to the interim destination after the real page
// ships. To launch a page: delete its entry here and add the page
// at src/app/go/<code>/.
{
source: "/go/more-info-1",
destination: "/",
permanent: false,
},
];
},
};
export default nextConfig;