-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
57 lines (50 loc) · 1.59 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
const TSConfigPathsPlugin = require("tsconfig-paths-webpack-plugin").default;
require("dotenv").config();
module.exports = {
assetPrefix: process.env.NEXT_ASSET_PREFIX,
crossOrigin: process.env.NEXT_CROSS_ORIGIN,
webpack: (config) => {
config.resolve.plugins.push(new TSConfigPathsPlugin());
config.module.rules.push({
test: /\.svg$/i,
oneOf: [
{
type: "asset",
resourceQuery: /url/,
},
{
issuer: /\.[jt]sx?$/,
use: ["@svgr/webpack"],
},
],
});
return config;
},
headers: () => ([
{
source: "/fonts/(.*).otf",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
]),
serverRuntimeConfig: {
port: Number(process.env.PORT || 3000),
tpayMerchantId: process.env.TPAY_MERCHANT_ID,
tpayVerificationCode: process.env.TPAY_VERIFICATION_CODE,
tpayApiKey: process.env.TPAY_API_KEY,
tpayApiPassword: process.env.TPAY_API_PASSWORD,
sendgridApiKey: process.env.SENDGRID_API_KEY,
joinClubEmail: process.env.JOIN_CLUB_EMAIL,
},
publicRuntimeConfig: {
graphqlEndpoint: process.env.PRISMIC_GRAPHQL_ENDPOINT,
googleAnalyticsId: process.env.GOOGLE_ANALYTICS_ID,
},
generateBuildId: async () => {
return process.env.BUILD_ID || null;
},
};