2022-10-26 22:28:55 +02:00
|
|
|
// @ts-check
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @type {import('next').NextConfig}
|
|
|
|
**/
|
|
|
|
const nextConfig = {
|
2020-08-06 00:20:49 +02:00
|
|
|
// Uncomment the line below to enable basePath, pages and
|
|
|
|
// redirects will then have a path prefix (`/app` in this case)
|
|
|
|
//
|
|
|
|
// basePath: '/app',
|
|
|
|
|
|
|
|
async redirects() {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: "/team",
|
|
|
|
destination: "/about",
|
|
|
|
permanent: false,
|
|
|
|
},
|
|
|
|
// Path Matching - will match `/old-blog/a`, but not `/old-blog/a/b`
|
|
|
|
{
|
|
|
|
source: "/old-blog/:slug",
|
|
|
|
destination: "/news/:slug",
|
|
|
|
permanent: false,
|
|
|
|
},
|
|
|
|
// Wildcard Path Matching - will match `/blog/a` and `/blog/a/b`
|
|
|
|
{
|
|
|
|
source: "/blog/:slug*",
|
|
|
|
destination: "/news/:slug*",
|
|
|
|
permanent: false,
|
|
|
|
},
|
|
|
|
// Regex Path Matching - The regex below will match `/post/123` but not `/post/abc`
|
|
|
|
{
|
2020-11-24 23:05:32 +01:00
|
|
|
source: "/post/:slug(\\d{1,})",
|
|
|
|
destination: "/news/:slug",
|
2020-08-06 00:20:49 +02:00
|
|
|
permanent: false,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
},
|
|
|
|
};
|
2022-10-26 22:28:55 +02:00
|
|
|
|
|
|
|
module.exports = nextConfig;
|