This repository was archived by the owner on Jul 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathnext.config.js
More file actions
39 lines (37 loc) · 1.45 KB
/
next.config.js
File metadata and controls
39 lines (37 loc) · 1.45 KB
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
const withHashicorp = require('@hashicorp/platform-nextjs-plugin')
const path = require('path')
const redirects = require('./redirects.next.js')
// Set api key for Happy Kit feature flags
const happyKitKey = process.env.NEXT_PUBLIC_FLAGS_ENV_KEY
? process.env.NEXT_PUBLIC_FLAGS_ENV_KEY
: 'flags_pub_development_343442393171755603'
module.exports = withHashicorp({
dato: {
// This token is safe to be in this public repository, it only has access to content that is publicly viewable on the website
token: '88b4984480dad56295a8aadae6caad',
},
nextOptimizedImages: true,
transpileModules: ['@hashicorp/flight-icons'],
mdx: { resolveIncludes: path.join(__dirname, 'pages/partials') },
})({
svgo: { plugins: [{ removeViewBox: false }] },
async redirects() {
return await redirects
},
env: {
HASHI_ENV: process.env.HASHI_ENV || 'development',
SEGMENT_WRITE_KEY: 'EnEETDWhfxp1rp09jVvJr66LdvwI6KVP',
BUGSNAG_CLIENT_KEY: 'eab8d5350ab3b12d77b7498b23f9a89a',
BUGSNAG_SERVER_KEY: '1f55a49019f70f94a17dd6d93210f09d',
IS_CONTENT_PREVIEW: process.env.IS_CONTENT_PREVIEW || false,
PREVIEW_FROM_REPO: process.env.PREVIEW_FROM_REPO,
NAV_DATA_DIRNAME: process.env.NAV_DATA_DIRNAME || '',
CONTENT_DIRNAME: process.env.CONTENT_DIRNAME || '',
CURRENT_GIT_BRANCH: process.env.CURRENT_GIT_BRANCH || 'main',
HAPPY_KIT_KEY: happyKitKey,
},
images: {
domains: ['www.datocms-assets.com'],
disableStaticImages: true,
},
})