-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
63 lines (52 loc) · 1.66 KB
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
if (!process.env.AWS_ACCESS_KEY_ID) {
throw new Error('Missing environment variable: AWS_ACCESS_KEY_ID')
}
if (!process.env.AWS_REGION) {
throw new Error('Missing environment variable: AWS_REGION')
}
if (!process.env.AWS_SECRET_ACCESS_KEY) {
throw new Error('Missing environment variable: AWS_SECRET_ACCESS_KEY')
}
if (!process.env.AWS_SES_RECEIVER_EMAIL) {
throw new Error('Missing environment variable: AWS_SES_RECEIVER_EMAIL')
}
if (!process.env.AWS_SES_SENDER_EMAIL) {
throw new Error('Missing environment variable: AWS_SES_SENDER_EMAIL')
}
if (!process.env.NEXT_PUBLIC_CDN_HOST) {
throw new Error('Missing environment variable: NEXT_PUBLIC_CDN_HOST')
}
if (!process.env.NEXT_PUBLIC_EMAIL_SUBSRIBE_URL) {
throw new Error('Missing environment variable: NEXT_PUBLIC_EMAIL_SUBSRIBE_URL')
}
if (!process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID) {
throw new Error('Missing environment variable: NEXT_PUBLIC_GOOGLE_ANALYTICS_ID')
}
const nextConfig = {
// Uncomment the below to support SSG export
// output: 'export',
// images: {
// unoptimized: true,
// },
env: {
NEXT_PUBLIC_CDN_HOST: process.env.NEXT_PUBLIC_CDN_HOST,
NEXT_PUBLIC_EMAIL_SUBSRIBE_URL: process.env.NEXT_PUBLIC_EMAIL_SUBSRIBE_URL,
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID: process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID,
},
async redirects() {
return [
{
source: '/projects/443-elevatr',
destination: '/projects/443-ele-vatr',
permanent: true,
},
{
source: '/projects/tilt-refrain',
destination: '/projects/studies',
permanent: true,
},
]
},
}
export default nextConfig