2024-01-15 12:33:15 +00:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const nextConfig = {
|
|
|
|
reactStrictMode: true,
|
|
|
|
experimental: {
|
|
|
|
scrollRestoration: true,
|
|
|
|
},
|
|
|
|
transpilePackages: [],
|
|
|
|
async redirects() {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/:sectionId/ucg/:articleId',
|
|
|
|
destination: '/:sectionId/:articleId',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/docs/introduction',
|
2024-01-30 14:19:25 +00:00
|
|
|
destination: '/quick-start',
|
2024-01-15 12:33:15 +00:00
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
2024-01-30 14:19:25 +00:00
|
|
|
source: '/introduction',
|
|
|
|
destination: '/quick-start',
|
2024-01-15 12:33:15 +00:00
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/docs/installation',
|
|
|
|
destination: '/installation',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/docs/usage',
|
2024-02-05 14:32:50 +00:00
|
|
|
destination: '/installation',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/usage',
|
|
|
|
destination: '/installation',
|
2024-01-15 12:33:15 +00:00
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// To reflect that these are at the top level of the sidebar
|
|
|
|
source: '/getting-started/:childId',
|
|
|
|
destination: '/:childId',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
// (This is a page that we referred people to quite often)
|
|
|
|
source: '/gen/editor/Editor-class',
|
2024-01-30 15:16:32 +00:00
|
|
|
destination: '/reference/editor/Editor',
|
2024-01-15 12:33:15 +00:00
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
// (This is a page that we referred people to quite often)
|
|
|
|
source: '/gen/editor/ShapeUtil-class',
|
2024-01-30 15:16:32 +00:00
|
|
|
destination: '/reference/editor/ShapeUtil',
|
2024-01-15 12:33:15 +00:00
|
|
|
permanent: true,
|
|
|
|
},
|
2024-02-01 14:16:17 +00:00
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/gen/:slug*',
|
|
|
|
destination: '/reference/:slug*',
|
|
|
|
permanent: true,
|
|
|
|
},
|
2024-01-15 12:33:15 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = nextConfig
|