-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
25 lines (24 loc) · 1.08 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
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_MANAGEMENT_TOKEN: process.env.CONTENTSTACK_MANAGEMENT_TOKEN,
CONTENTSTACK_GRAPHQL_HOST_NAME: process.env.CONTENTSTACK_GRAPHQL_HOST_NAME,
CONTENTSTACK_LIVE_PREVIEW_HOST_NAME:
process.env.CONTENTSTACK_LIVE_PREVIEW_HOST_NAME,
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",
},
};
module.exports =
process.env.NODE_ENV === "development" ? config : withPWA(config);