-
Notifications
You must be signed in to change notification settings - Fork 4
/
next.config.js
55 lines (55 loc) · 1.69 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
module.exports = () => {
const opts = {
poweredByHeader: false,
basePath: process.env.BASE_PATH,
env: {
// Backwards compatibility for people migrating from RAZZLE
NEXT_PUBLIC_SITE_HOSTNAME:
process.env.NEXT_PUBLIC_SITE_HOSTNAME ||
process.env.RAZZLE_SITE_HOSTNAME ||
process.env.URL,
NEXT_PUBLIC_VERCEL_URL: process.env.VERCEL_URL,
NEXT_PUBLIC_ONEGRAPH_APP_ID:
process.env.NEXT_PUBLIC_ONEGRAPH_APP_ID ||
process.env.RAZZLE_ONEGRAPH_APP_ID,
NEXT_PUBLIC_GITHUB_REPO_OWNER:
process.env.NEXT_PUBLIC_GITHUB_REPO_OWNER ||
process.env.RAZZLE_GITHUB_REPO_OWNER ||
process.env.VERCEL_GITHUB_ORG,
NEXT_PUBLIC_GITHUB_REPO_NAME:
process.env.NEXT_PUBLIC_GITHUB_REPO_NAME ||
process.env.RAZZLE_GITHUB_REPO_NAME ||
process.env.VERCEL_GITHUB_REPO,
NEXT_PUBLIC_TITLE:
process.env.NEXT_PUBLIC_TITLE || process.env.RAZZLE_TITLE,
NEXT_PUBLIC_DESCRIPTION:
process.env.NEXT_PUBLIC_DESCRIPTION || process.env.RAZZLE_DESCRIPTION,
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID:
process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID ||
process.env.RAZZLE_GOOGLE_ANALYTICS_TRACKING_ID,
},
experimental: {
reactMode: 'concurrent',
},
async rewrites() {
return [
{
source: '/feed.:ext',
destination: '/api/feed/:ext',
},
{
source: '/sitemap.xml',
destination: '/api/sitemap',
},
{
source: '/robots.txt',
destination: '/api/robots',
},
];
},
};
if (process.env.NETLIFY) {
opts.target = 'serverless';
}
return opts;
};