2020-01-18 00:18:09 +00:00
|
|
|
const withHashicorp = require('@hashicorp/nextjs-scripts')
|
|
|
|
const path = require('path')
|
|
|
|
|
|
|
|
module.exports = withHashicorp({
|
|
|
|
defaultLayout: true,
|
|
|
|
transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'],
|
|
|
|
mdx: { resolveIncludes: path.join(__dirname, 'pages') }
|
|
|
|
})({
|
|
|
|
experimental: {
|
|
|
|
css: true,
|
2020-03-13 22:34:39 +00:00
|
|
|
modern: true,
|
|
|
|
polyfillsOptimization: true,
|
2020-01-18 00:18:09 +00:00
|
|
|
rewrites: () => [
|
|
|
|
{
|
|
|
|
source: '/api/:path*',
|
|
|
|
destination: '/api-docs/:path*'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
redirects: () => [
|
2020-01-18 01:32:35 +00:00
|
|
|
{
|
|
|
|
source: '/intro',
|
|
|
|
destination: '/intro/getting-started',
|
|
|
|
permanent: false
|
|
|
|
}
|
2020-01-18 00:18:09 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
exportTrailingSlash: true,
|
|
|
|
env: {
|
|
|
|
HASHI_ENV: process.env.HASHI_ENV
|
|
|
|
}
|
|
|
|
})
|