docs: add script to catch bad redirects (#12361)

* docs: add script to catch bad redirects

* add missing dependency
This commit is contained in:
Shahed Nasser
2025-05-05 12:49:05 +03:00
committed by GitHub
parent e4d853185f
commit f25a4a5e34
9 changed files with 35 additions and 6 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import bundleAnalyzer from "@next/bundle-analyzer"
import mdx from "@next/mdx"
import mdxPluginOptions from "./mdx-options.mjs"
import path from "node:path"
import { catchBadRedirects } from "build-scripts"
const withMDX = mdx({
extension: /\.mdx?$/,
@@ -62,7 +63,7 @@ const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/resources",
async redirects() {
return [
return catchBadRedirects([
{
source: "/commerce-modules/order/relations-to-other-modules",
destination: "/commerce-modules/order/links-to-other-modules",
@@ -228,7 +229,7 @@ const nextConfig = {
destination: "/references/user/events",
permanent: true,
},
]
])
},
outputFileTracingExcludes: {
"*": ["node_modules/@medusajs/icons"],