38 lines
785 B
TypeScript
38 lines
785 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
trailingSlash: true,
|
|
output: "standalone",
|
|
// Removed output: "export" to enable API routes and ISR for blog functionality
|
|
|
|
// Force new build ID to bust cache
|
|
generateBuildId: async () => {
|
|
return `build-${Date.now()}`;
|
|
},
|
|
|
|
// Prevent nginx from caching HTML pages
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/:path*",
|
|
headers: [
|
|
{
|
|
key: "Cache-Control",
|
|
value: "no-cache, no-store, must-revalidate",
|
|
},
|
|
{
|
|
key: "Pragma",
|
|
value: "no-cache",
|
|
},
|
|
{
|
|
key: "Expires",
|
|
value: "0",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|