Files
storycove/frontend/next.config.js
2025-09-04 15:49:24 +02:00

33 lines
820 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
// Enable standalone output for optimized Docker builds
output: 'standalone',
// Removed Next.js rewrites since nginx handles all API routing
webpack: (config, { isServer }) => {
// Exclude cheerio and its dependencies from client-side bundling
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
'undici': false,
};
config.externals.push('cheerio', 'server-only');
}
return config;
},
images: {
domains: ['localhost'],
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
port: '80',
pathname: '/images/**',
},
],
},
};
module.exports = nextConfig;