2023-04-25 11:01:25 +00:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const nextConfig = {
|
|
|
|
reactStrictMode: true,
|
|
|
|
experimental: {
|
|
|
|
scrollRestoration: true,
|
|
|
|
},
|
|
|
|
transpilePackages: ['@tldraw/utils'],
|
2023-06-19 18:48:55 +00:00
|
|
|
async redirects() {
|
|
|
|
return [
|
|
|
|
{
|
2023-06-23 09:53:22 +00:00
|
|
|
// For reverse compatibility with old links
|
2023-06-19 18:48:55 +00:00
|
|
|
source: '/:sectionId/ucg/:articleId',
|
|
|
|
destination: '/:sectionId/:articleId',
|
|
|
|
permanent: true,
|
|
|
|
},
|
2023-06-23 09:53:22 +00:00
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/docs/introduction',
|
|
|
|
destination: '/introduction',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/docs/installation',
|
|
|
|
destination: '/installation',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// For reverse compatibility with old links
|
|
|
|
source: '/docs/usage',
|
|
|
|
destination: '/usage',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// To reflect that these are at the top level of the sidebar
|
|
|
|
source: '/getting-started/:childId',
|
|
|
|
destination: '/:childId',
|
|
|
|
permanent: true,
|
|
|
|
},
|
2023-06-19 18:48:55 +00:00
|
|
|
]
|
|
|
|
},
|
2023-04-25 11:01:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = nextConfig
|