-
Notifications
You must be signed in to change notification settings - Fork 70
/
next.config.js
40 lines (38 loc) · 1.54 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
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.BUNDLE_ANALYZE === "true",
});
/** @type {import('next').NextConfig} */
const nextConfig = {
trailingSlash: true,
output: "export",
exportPathMap: function exportMap() {
return {
"/": { page: "/" },
"/collaborate": { page: "/collaborate" },
"/privacy": { page: "/privacy" },
"/terms": { page: "/terms" },
"/collaborators-terms": { page: "/collaborators-terms" },
"/viewer": { page: "/viewer" },
"/faq": { page: "/faq" },
};
},
env: {
INFURA_API_KEY: process.env.INFURA_API_KEY || "84842078b09946638c03157f83405213", // Default API key from Ethers
ALCHEMY_API_KEY: process.env.ALCHEMY_API_KEY || "FK1x9CdE8NStKjVt236D_LP7B6MMCFOs",
TRUSTED_TLDS: process.env.TRUSTED_TLDS || "gov.sg,edu.sg",
GA4_TAG_ID: process.env.GA4_TAG_ID || "G-JP12T2F01V",
WOGAA_ENV: process.env.WOGAA_ENV || "production",
},
// Variables passed to both server and client
publicRuntimeConfig: {
network: process.env.NET,
legacyRendererUrl: process.env.LEGACY_RENDERER_URL,
context: process.env.CONTEXT, // https://www.netlify.com/docs/continuous-deployment/?_ga=2.254249672.1986722564.1569467860-817711885.1562657089#build-environment-variables
},
experimental: {
// workaround to for next to play nice with oa-verify's new version
// might be related to https://github.com/vercel/next.js/issues/39375#issuecomment-1380266233
esmExternals: false,
},
};
module.exports = withBundleAnalyzer(nextConfig);