next-enterprise/next.config.mjs
2024-01-24 03:04:18 +08:00

30 lines
768 B
JavaScript

import withBundleAnalyzer from "@next/bundle-analyzer"
import withPlugins from "next-compose-plugins"
import { env } from "./env.mjs"
/**
* @type {import('next').NextConfig}
*/
const config = withPlugins([[withBundleAnalyzer({ enabled: env.ANALYZE })]], {
reactStrictMode: true,
experimental: { instrumentationHook: true },
rewrites() {
return [
{ source: "/healthz", destination: "/api/health" },
{ source: "/api/healthz", destination: "/api/health" },
{ source: "/health", destination: "/api/health" },
{ source: "/ping", destination: "/api/health" },
]
},
async redirects() {
return [
{
source: '/',
destination: '/login',
permanent: true,
},
]
},
})
export default config