39443-vm/frontend/next.config.mjs
2026-04-03 06:29:03 +00:00

46 lines
848 B
JavaScript

/**
* @type {import('next').NextConfig}
*/
const output = process.env.NODE_ENV === 'production' ? 'export' : 'standalone';
const backendProxyTarget = process.env.BACKEND_INTERNAL_URL || 'http://127.0.0.1:3000';
const nextConfig = {
trailingSlash: true,
async rewrites() {
if (process.env.NODE_ENV === 'production') {
return [];
}
return [
{
source: '/api/:path*',
destination: `${backendProxyTarget}/api/:path*`,
},
];
},
distDir: 'build',
output,
basePath: "",
devIndicators: {
position: 'bottom-left',
},
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
images: {
unoptimized: true,
remotePatterns: [
{
protocol: 'https',
hostname: '**',
},
],
},
}
export default nextConfig