packer-cn/website/next.config.js

24 lines
546 B
JavaScript
Raw Normal View History

2020-03-18 18:46:47 -04:00
const withHashicorp = require('@hashicorp/nextjs-scripts')
const path = require('path')
module.exports = withHashicorp({
defaultLayout: true,
transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'],
2020-03-24 20:03:49 -04:00
mdx: { resolveIncludes: path.join(__dirname, 'pages/partials') },
2020-03-18 18:46:47 -04:00
})({
experimental: {
css: true,
modern: true,
rewrites: () => [
{
source: '/api/:path*',
2020-03-24 20:03:49 -04:00
destination: '/api-docs/:path*',
},
],
2020-03-18 18:46:47 -04:00
},
exportTrailingSlash: true,
env: {
2020-03-24 20:03:49 -04:00
HASHI_ENV: process.env.HASHI_ENV,
},
2020-03-18 18:46:47 -04:00
})