2021-07-27 22:43:40 +00:00
|
|
|
const withHashicorp = require('@hashicorp/platform-nextjs-plugin')
|
2021-01-15 20:29:22 +00:00
|
|
|
const redirects = require('./redirects.next')
|
2020-01-18 00:18:09 +00:00
|
|
|
|
2021-12-17 17:58:05 +00:00
|
|
|
// log out our primary environment variables for clarity in build logs
|
|
|
|
console.log(`HASHI_ENV: ${process.env.HASHI_ENV}`)
|
|
|
|
console.log(`NODE_ENV: ${process.env.NODE_ENV}`)
|
|
|
|
console.log(`VERCEL_ENV: ${process.env.VERCEL_ENV}`)
|
|
|
|
console.log(`MKTG_CONTENT_API: ${process.env.MKTG_CONTENT_API}`)
|
|
|
|
console.log(`ENABLE_VERSIONED_DOCS: ${process.env.ENABLE_VERSIONED_DOCS}`)
|
|
|
|
|
2021-05-06 17:32:25 +00:00
|
|
|
module.exports = withHashicorp({
|
2021-12-15 15:32:45 +00:00
|
|
|
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',
|
|
|
|
},
|
2021-10-07 15:23:19 +00:00
|
|
|
nextOptimizedImages: true,
|
2021-12-15 15:32:45 +00:00
|
|
|
transpileModules: ['@hashicorp/flight-icons'],
|
2021-05-06 17:32:25 +00:00
|
|
|
})({
|
2020-10-09 16:15:38 +00:00
|
|
|
svgo: { plugins: [{ removeViewBox: false }] },
|
2020-12-17 21:53:33 +00:00
|
|
|
rewrites: () => [
|
|
|
|
{
|
|
|
|
source: '/api/:path*',
|
|
|
|
destination: '/api-docs/:path*',
|
|
|
|
},
|
|
|
|
],
|
2021-01-15 20:29:22 +00:00
|
|
|
redirects: () => redirects,
|
2020-01-18 00:18:09 +00:00
|
|
|
env: {
|
2020-05-21 17:18:17 +00:00
|
|
|
HASHI_ENV: process.env.HASHI_ENV || 'development',
|
|
|
|
SEGMENT_WRITE_KEY: 'OdSFDq9PfujQpmkZf03dFpcUlywme4sC',
|
|
|
|
BUGSNAG_CLIENT_KEY: '07ff2d76ce27aded8833bf4804b73350',
|
|
|
|
BUGSNAG_SERVER_KEY: 'fb2dc40bb48b17140628754eac6c1b11',
|
2021-12-17 17:58:05 +00:00
|
|
|
ENABLE_VERSIONED_DOCS: process.env.ENABLE_VERSIONED_DOCS || false,
|
2020-04-09 17:56:59 +00:00
|
|
|
},
|
2021-12-15 15:32:45 +00:00
|
|
|
images: {
|
|
|
|
domains: ['www.datocms-assets.com'],
|
|
|
|
disableStaticImages: true,
|
|
|
|
},
|
2020-01-18 00:18:09 +00:00
|
|
|
})
|