the-tip-top-frontend/next.config.js
soufiane 3e36284146 feat: add Prometheus HTTP metrics for frontend
- Add metrics middleware for request tracking
- Add /api/metrics endpoint
- Add /api/track endpoint for async tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:42:03 +01:00

33 lines
900 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
env: {
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
},
// Ignore build errors for pages that require client-side only rendering
typescript: {
ignoreBuildErrors: false,
},
eslint: {
ignoreDuringBuilds: false,
},
// Skip static page generation errors for client-only pages
experimental: {
missingSuspenseWithCSRBailout: false,
instrumentationHook: true,
},
// Generate error pages instead of failing build on prerender errors
staticPageGenerationTimeout: 120,
// Generate build ID with timestamp to avoid cache issues
generateBuildId: async () => {
return `build-${Date.now()}`;
},
// Disable cache for assets to ensure fresh content
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
};
module.exports = nextConfig;