Some checks failed
🚀 Build & Deploy / 🔍 Prepare (push) Successful in 4s
🚀 Build & Deploy / 🚀 Deploy (push) Has been cancelled
🚀 Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
🚀 Build & Deploy / 🏗️ Build (push) Has been cancelled
🚀 Build & Deploy / 🔔 Notify (push) Has been cancelled
🚀 Build & Deploy / 🧪 QA (push) Has been cancelled
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
import withMintelConfig from "@mintel/next-config";
|
|
import createMDX from "@next/mdx";
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
|
|
async rewrites() {
|
|
const umamiUrl =
|
|
process.env.UMAMI_API_ENDPOINT ||
|
|
process.env.UMAMI_SCRIPT_URL ||
|
|
process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL ||
|
|
"https://analytics.infra.mintel.me";
|
|
const glitchtipUrl = process.env.SENTRY_DSN
|
|
? new URL(process.env.SENTRY_DSN).origin
|
|
: "https://errors.infra.mintel.me";
|
|
|
|
return [
|
|
{
|
|
source: "/stats/:path*",
|
|
destination: `${umamiUrl}/:path*`,
|
|
},
|
|
{
|
|
source: "/:locale(de)/stats/:path*",
|
|
destination: `${umamiUrl}/:path*`,
|
|
},
|
|
{
|
|
source: "/errors/:path*",
|
|
destination: `${glitchtipUrl}/:path*`,
|
|
},
|
|
{
|
|
source: "/:locale(de)/errors/:path*",
|
|
destination: `${glitchtipUrl}/:path*`,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
const withMDX = createMDX({});
|
|
|
|
export default withMintelConfig(withMDX(nextConfig));
|