open-vault/website/next.config.js
Jeff Escalante fbfed414bd
Routing Fixes (#8703)
* fix a couple of .html extension links
* remove trailing slash config
* fix redirects, broken links, incorrect anchor link formats
2020-04-09 13:56:59 -04:00

31 lines
687 B
JavaScript

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,
modern: true,
polyfillsOptimization: true,
rewrites: () => [
{
source: '/api/:path*',
destination: '/api-docs/:path*',
},
],
redirects: () => [
{
source: '/intro',
destination: '/intro/getting-started',
permanent: false,
},
],
},
env: {
HASHI_ENV: process.env.HASHI_ENV,
},
})