-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
29 lines (27 loc) · 1.03 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
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_ENVIRONMENT: process.env.CONTENTSTACK_ENVIRONMENT,
CONTENTSTACK_MANAGEMENT_TOKEN: process.env.CONTENTSTACK_MANAGEMENT_TOKEN,
CONTENTSTACK_API_HOST:
process.env.CONTENTSTACK_API_HOST || 'api.contentstack.io',
CONTENTSTACK_APP_HOST:
process.env.CONTENTSTACK_APP_HOST || 'app.contentstack.com',
NEXT_PUBLIC_CONTENTSTACK_API_KEY: process.env.CONTENTSTACK_API_KEY,
CONTENTSTACK_LIVE_PREVIEW:
process.env.NEXT_PUBLIC_CONTENTSTACK_LIVE_PREVIEW || 'true',
CONTENTSTACK_LIVE_EDIT_TAGS:
process.env.CONTENTSTACK_LIVE_EDIT_TAGS || 'false',
},
i18n: {
locales: ['en', 'fr', 'de' ],
defaultLocale: 'en',
},
};
module.exports =
process.env.NODE_ENV === 'development' ? config : withPWA(config);