refactor: update next.config to typescript

This commit is contained in:
Igor Klepacki 2025-01-23 14:27:03 +01:00
parent e96bb9a6d7
commit ef08a7b781
No known key found for this signature in database
GPG key ID: 951043B45C7A29E7
4 changed files with 28 additions and 42 deletions

21
next.config.ts Normal file
View file

@ -0,0 +1,21 @@
import withBundleAnalyzer from "@next/bundle-analyzer"
import { type NextConfig } from "next"
import { env } from "./env.mjs"
const config: NextConfig = {
reactStrictMode: true,
logging: {
fetches: {
fullUrl: true,
},
},
rewrites: async () => [
{ source: "/healthz", destination: "/api/health" },
{ source: "/api/healthz", destination: "/api/health" },
{ source: "/health", destination: "/api/health" },
{ source: "/ping", destination: "/api/health" },
],
}
export default env.ANALYZE ? withBundleAnalyzer({ enabled: env.ANALYZE })(config) : config