-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
67 lines (62 loc) · 1.26 KB
/
next.config.js
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
/** @type {import('next').NextConfig} */
const baseConfig = {
reactStrictMode: true,
transpilePackages: ["@cloudscape-design/components"],
};
const REWRITES = [
{
source: "/mentor",
destination: "https://forms.gle/tcnikpj5gHnGPNvx7",
},
{
source: "/volunteer",
destination: "https://forms.gle/bLw9nHffqoz4kAGR7",
},
{
source: "/report",
destination: "https://forms.gle/yM8Revi2NLHGNKs17",
},
{
source: "/feedback",
destination: "https://forms.gle/eo7gaNCQVH3PRJep7",
},
{
source: "/googlecloud",
destination: "https://goo.gle/googlecloudcredits",
},
];
const REDIRECTS = [
{
source: "/devpost",
destination: "https://hack-at-uci-2023.devpost.com",
permanent: true,
},
];
/** @type {import('next').NextConfig} */
const nextConfig = {
...baseConfig,
swcMinify: false,
async rewrites() {
return REWRITES;
},
async redirects() {
return REDIRECTS;
},
};
/** @type {import('next').NextConfig} */
const devConfig = {
...baseConfig,
async rewrites() {
return REWRITES.concat([
{
source: "/api/:path*",
destination: "http://127.0.0.1:8000/:path*",
},
]);
},
async redirects() {
return REDIRECTS;
},
};
const developmentEnv = process.env.NODE_ENV === "development";
module.exports = developmentEnv ? devConfig : nextConfig;