-
Notifications
You must be signed in to change notification settings - Fork 75
/
next.config.js
27 lines (26 loc) · 1.15 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
const withPWA = require("next-pwa")({
dest: "public",
});
const config = {
publicRuntimeConfig: {
// Will be available on both server and client
CONTENTSTACK_API_KEY: process.env.CONTENTSTACK_API_KEY,
CONTENTSTACK_DELIVERY_TOKEN: process.env.CONTENTSTACK_DELIVERY_TOKEN,
CONTENTSTACK_BRANCH: process.env.CONTENTSTACK_BRANCH || "main",
CONTENTSTACK_REGION: process.env.CONTENTSTACK_REGION || "us",
CONTENTSTACK_ENVIRONMENT: process.env.CONTENTSTACK_ENVIRONMENT,
CONTENTSTACK_PREVIEW_TOKEN: process.env.CONTENTSTACK_PREVIEW_TOKEN,
CONTENTSTACK_PREVIEW_HOST:
process.env.CONTENTSTACK_PREVIEW_HOST || "rest-preview.contentstack.com",
CONTENTSTACK_API_HOST:
process.env.CONTENTSTACK_API_HOST || "api.contentstack.io",
CONTENTSTACK_APP_HOST:
process.env.CONTENTSTACK_APP_HOST || "app.contentstack.com",
CONTENTSTACK_LIVE_PREVIEW: process.env.CONTENTSTACK_LIVE_PREVIEW || "true",
CONTENTSTACK_LIVE_EDIT_TAGS:
process.env.CONTENTSTACK_LIVE_EDIT_TAGS || "false",
},
experimental: { largePageDataBytes: 128 * 100000 },
};
module.exports =
process.env.NODE_ENV === "development" ? config : withPWA(config);