-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
78 lines (70 loc) · 2.1 KB
/
Copy pathnext.config.js
File metadata and controls
78 lines (70 loc) · 2.1 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
const isProd = process.env.NODE_ENV === "production";
const basePath = isProd ? process.env.NEXT_PUBLIC_BASE_PATH || "" : "";
module.exports = {
basePath,
// next rejects an empty string here — omit it entirely when there's no base path
assetPrefix: basePath || undefined,
trailingSlash: true,
staticPageGenerationTimeout: 300,
images: {
// unoptimized: true,
loader: "akamai",
path: "/",
domains: [
"www.notion.so",
"notion.so",
"images.unsplash.com",
"pbs.twimg.com",
"abs.twimg.com",
"s3.us-west-2.amazonaws.com",
"surulere.dev",
],
formats: ["image/avif", "image/webp"],
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
eslint: {
// TODO: revert this after fixing builds + before site is ready to go live
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
typescript: {
// TODO: revert this after fixing builds + before site is ready to go live
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
redirects: async () => {
return [
{
source: "/2020/08/23/mapping-lagos-slums.html",
destination: "/mapping-lagos-slums",
permanent: true,
},
{
source: "/2020/08/16/naira-stablecoins.html",
destination: "/naira-stablecoins",
permanent: true,
},
{
source: "/2020/03/01/blockchain-in-africa.html",
destination: "/blockchain-in-africa",
permanent: true,
},
{
source:
"/2018/07/23/digital-platform-adoption-in-developing-countries.html",
destination: "/digital-platform-adoption-in-developing-countries",
permanent: true,
},
];
},
// next 12 moved this out of `experimental`; it was a silent no-op there
swcMinify: true,
experimental: {
largePageDataBytes: 512 * 100000,
},
};