Files
markdownblog/next.config.js
2025-07-27 17:13:21 +02:00

30 lines
697 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
swcMinify: true,
// Exclude SSE route from static generation
experimental: {
serverComponentsExternalPackages: ['chokidar']
},
basePath: process.env.BASE_URL || '',
env: {
NEXT_PUBLIC_BASE_URL: process.env.BASE_URL || '',
},
// Handle API routes that shouldn't be statically generated
async headers() {
return [
{
source: '/api/posts/stream',
headers: [
{
key: 'Cache-Control',
value: 'no-cache, no-store, must-revalidate',
},
],
},
];
},
}
module.exports = nextConfig