next-enterprise/next.config.mjs

37 lines
939 B
JavaScript
Raw Normal View History

2024-09-30 15:19:20 -05:00
import withBundleAnalyzer from "@next/bundle-analyzer";
import withPlugins from "next-compose-plugins";
import { env } from "./env.mjs";
2023-04-16 19:04:24 +02:00
2023-04-21 12:11:00 +02:00
/**
* @type {import('next').NextConfig}
*/
2024-09-30 15:19:20 -05:00
const nextConfig = {
2023-04-21 12:11:00 +02:00
reactStrictMode: true,
2024-09-19 19:22:43 -05:00
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,
2024-09-19 19:22:43 -05:00
},
rewrites() {
return [
{ source: "/healthz", destination: "/api/health" },
{ source: "/api/healthz", destination: "/api/health" },
{ source: "/health", destination: "/api/health" },
{ source: "/ping", destination: "/api/health" },
2024-09-30 15:19:20 -05:00
];
},
2024-09-30 15:19:20 -05:00
};
2024-09-30 15:19:20 -05:00
export default withPlugins(
[
[
withBundleAnalyzer({
enabled: env.ANALYZE === "true",
}),
],
],
nextConfig
);