website: set up support for path redirection (#533)
* website: remove netlify specific _redirects file * website: add basic support for redirects.js
This commit is contained in:
1 parent
09b43e5569
commit
4a5e384ee3
3 files changed
+13
-4
No files matched your search
@@ -1,4 +0,0 @@
|
||||
# REDIRECTS FILE
|
||||
#
|
||||
# See the README file in this directory for documentation. Please do not
|
||||
# modify or delete existing redirects without first verifying internally.
|
||||
@@ -1,5 +1,6 @@
|
||||
const withHashicorp = require('@hashicorp/nextjs-scripts')
|
||||
const path = require('path')
|
||||
const redirects = require('./redirects.js')
|
||||
|
||||
// log out our primary environment variables for clarity in build logs
|
||||
console.log(`HASHI_ENV: ${process.env.HASHI_ENV}`)
|
||||
@@ -13,6 +14,9 @@ module.exports = withHashicorp({
|
||||
transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'],
|
||||
mdx: { resolveIncludes: path.join(__dirname, 'pages/partials') },
|
||||
})({
|
||||
async redirects() {
|
||||
return await redirects
|
||||
},
|
||||
experimental: { modern: true },
|
||||
env: {
|
||||
HASHI_ENV: process.env.HASHI_ENV || 'development',
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
module.exports = [
|
||||
// define your custom redirects within this file.
|
||||
// vercel's redirect documentation: https://vercel.com/docs/configuration#project/redirects
|
||||
// {
|
||||
// source: '/foo',
|
||||
// destination: '/bar',
|
||||
// permanent: false,
|
||||
// },
|
||||
]
|
||||
Reference in new issue
Block a user