docs: add script to catch bad redirects (#12361)
* docs: add script to catch bad redirects * add missing dependency
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user