docs: fix rewrites in sub-projects to prevent loop on 404 page (#8255)
This commit is contained in:
@@ -82,21 +82,7 @@ const nextConfig = {
|
||||
|
||||
transpilePackages: ["docs-ui"],
|
||||
// TODO uncomment if we decide on baes path
|
||||
// basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2/user-guide",
|
||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/user-guide",
|
||||
async rewrites() {
|
||||
return {
|
||||
fallback: [
|
||||
{
|
||||
source: "/:path*",
|
||||
destination: `${
|
||||
process.env.NEXT_PUBLIC_DOCS_URL || "https://localhost:3001"
|
||||
}/:path*`,
|
||||
basePath: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2/user-guide",
|
||||
}
|
||||
|
||||
export default withMDX(nextConfig)
|
||||
|
||||
Reference in New Issue
Block a user