Files
carmanagement/apps/admin/next.config.js
T
2026-05-06 22:58:23 -04:00

20 lines
464 B
JavaScript

/** @type {import('next').NextConfig} */
const apiOrigin = (process.env.API_INTERNAL_URL ?? process.env.API_URL ?? 'http://localhost:4000').replace(/\/api\/v1\/?$/, '')
const nextConfig = {
images: {
domains: ['res.cloudinary.com'],
},
transpilePackages: ['@rentaldrivego/types'],
async rewrites() {
return [
{
source: '/api/:path*',
destination: `${apiOrigin}/api/:path*`,
},
]
},
}
module.exports = nextConfig