docs: add script to catch bad redirects (#12361)
* docs: add script to catch bad redirects * add missing dependency
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
crossProjectLinksPlugin,
|
||||
} from "remark-rehype-plugins"
|
||||
import path from "path"
|
||||
import { catchBadRedirects } from "build-scripts"
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
@@ -23,13 +24,13 @@ const nextConfig = {
|
||||
optimizePackageImports: ["docs-utils"],
|
||||
},
|
||||
async redirects() {
|
||||
return [
|
||||
return catchBadRedirects([
|
||||
{
|
||||
source: "/api/download/:path",
|
||||
destination: "/download/:path",
|
||||
permanent: true,
|
||||
},
|
||||
]
|
||||
])
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
"@types/pluralize": "^0.0.33",
|
||||
"@types/react": "npm:types-react@rc",
|
||||
"@types/react-dom": "npm:types-react@rc",
|
||||
"build-scripts": "*",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
|
||||
Reference in New Issue
Block a user