packer-cn/website/next.config.js

30 lines
872 B
JavaScript
Raw Normal View History

2020-03-18 18:46:47 -04:00
const withHashicorp = require('@hashicorp/nextjs-scripts')
const path = require('path')
const redirects = require('./redirects.next')
2020-03-18 18:46:47 -04:00
module.exports = withHashicorp({
defaultLayout: true,
transpileModules: [
'is-absolute-url',
'@hashicorp/react-.*',
'@hashicorp/versioned-docs',
],
2020-03-24 20:03:49 -04:00
mdx: { resolveIncludes: path.join(__dirname, 'pages/partials') },
2020-03-18 18:46:47 -04:00
})({
2020-10-07 10:57:47 -04:00
svgo: { plugins: [{ removeViewBox: false }] },
2020-12-04 16:00:53 -05:00
rewrites: () => [
{
source: '/api/:path*',
destination: '/api-docs/:path*',
},
],
redirects: () => redirects,
2020-05-29 17:14:29 -04:00
// Note: These are meant to be public, it's not a mistake that they are here
2020-03-18 18:46:47 -04:00
env: {
2020-03-24 20:03:49 -04:00
HASHI_ENV: process.env.HASHI_ENV,
SEGMENT_WRITE_KEY: 'AjXdfmTTk1I9q9dfyePuDFHBrz1tCO3l',
BUGSNAG_CLIENT_KEY: 'de0b822b269aa57b620efd8927e03744',
BUGSNAG_SERVER_KEY: 'b6c57b27a37e531a5de94f065dd98bc0',
2020-03-24 20:03:49 -04:00
},
2020-03-18 18:46:47 -04:00
})