Files
global_it24_landing/nextjs_space/next.config.prod.js
2025-10-25 08:47:39 +00:00

51 lines
1.1 KiB
JavaScript

const path = require('path');
/** @type {import('next').NextConfig} */
const nextConfig = {
distDir: process.env.NEXT_DIST_DIR || '.next',
output: 'standalone',
experimental: {
outputFileTracingRoot: path.join(__dirname, '../'),
},
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: false,
},
images: {
unoptimized: true,
domains: [],
},
// Оптимизация для production
compress: true,
poweredByHeader: false,
reactStrictMode: true,
swcMinify: true,
// Настройки для работы за reverse proxy (Traefik)
async headers() {
return [
{
source: '/:all*(svg|jpg|jpeg|png|gif|ico|webp)',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
{
source: '/_next/static/:path*',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
];
},
};
module.exports = nextConfig;