Files
protekauto-cms/next.config.ts

45 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/** @type {import('next').NextConfig} */
const nextConfig = {
// Оптимизация для Docker
output: 'standalone',
// Исключаем favicon из обработки как страницу
async rewrites() {
return [];
},
// Настройки для CSS (optimizeCss отключен из-за проблем с critters)
// experimental: {
// optimizeCss: true,
// },
// Настройки для статических файлов
assetPrefix: process.env.NODE_ENV === 'production' ? undefined : '',
// Настройки для сборки
// swcMinify удален в Next.js 15 (включен по умолчанию)
// Настройки для изображений
images: {
unoptimized: true,
domains: ['localhost'],
},
// Настройки webpack для CSS
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
// Убеждаемся, что CSS правильно обрабатывается
if (!dev && !isServer) {
config.optimization.splitChunks.cacheGroups.styles = {
name: 'styles',
test: /\.(css|scss)$/,
chunks: 'all',
enforce: true,
};
}
return config;
},
};
export default nextConfig;