File size: 519 Bytes
fb8c550
 
5a0e691
 
 
76fb273
5a0e691
 
 
76fb273
5a0e691
 
 
 
 
19e927e
fb8c550
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { withSentryConfig } = require('@sentry/nextjs');

/** @type {import('next').NextConfig} */
const nextConfig = {
  async rewrites() {
    const backendUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
    return [
      {
        source: '/api/backend/:path*',
        destination: `${backendUrl}/:path*`,
      },
    ];
  },
};

// Force clean Vercel rebuild — reads NEXT_PUBLIC_API_URL at build time
module.exports = withSentryConfig(nextConfig, {
  silent: true,
  hideSourceMaps: true,
});