next-enterprise/next.config.mjs
2024-09-24 17:35:35 -05:00

28 lines
872 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: false },
env: {
REACT_APP_API_URL: process.env.REACT_APP_API_URL,
API_PASS_SERVICE: process.env.REACT_APP_API_PASS_SERVICE,
REACT_APP_API_KEY: process.env.REACT_APP_API_KEY,
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
},
rewrites() {
return [
{ source: "/healthz", destination: "/api/health" },
{ source: "/api/healthz", destination: "/api/health" },
{ source: "/health", destination: "/api/health" },
{ source: "/ping", destination: "/api/health" },
]
},
})
export default config