Files
2025-12-07 12:58:43 +05:30

31 lines
764 B
TypeScript

import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
output: 'standalone',
transpilePackages: ['@nats-console/shared'],
devIndicators: false,
// Proxy API requests to the backend
// In single-container mode: API is at localhost:3001
// In multi-container mode: API_URL env var points to the API service
async rewrites() {
const apiUrl = process.env.API_URL || 'http://localhost:3001';
return [
{
source: '/api/:path*',
destination: `${apiUrl}/api/:path*`,
},
{
source: '/health/:path*',
destination: `${apiUrl}/health/:path*`,
},
{
source: '/ws/:path*',
destination: `${apiUrl}/ws/:path*`,
},
];
},
};
export default nextConfig;