Files
home/Projects/docs.pivoine.art/next.config.mjs

58 lines
1.0 KiB
JavaScript
Raw Normal View History

2025-10-09 19:11:53 +02:00
/** @type {import('next').NextConfig} */
const nextConfig = {
2025-10-10 16:43:21 +02:00
output: "export",
reactStrictMode: true,
2025-10-09 19:11:53 +02:00
2025-10-10 16:43:21 +02:00
// Next.js 15 uses turbopack by default for dev
// No need to explicitly enable swcMinify anymore
2025-10-09 19:11:53 +02:00
2025-10-10 16:43:21 +02:00
// Optimize production build
compiler: {
removeConsole: process.env.NODE_ENV === "production",
},
2025-10-09 19:11:53 +02:00
2025-10-10 16:43:21 +02:00
// Image optimization
images: {
formats: ["image/avif", "image/webp"],
},
2025-10-09 19:11:53 +02:00
2025-10-10 16:43:21 +02:00
// Headers for security
async headers() {
return [
{
source: "/:path*",
headers: [
{
key: "X-DNS-Prefetch-Control",
value: "on",
},
{
key: "X-Frame-Options",
value: "SAMEORIGIN",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "Referrer-Policy",
value: "origin-when-cross-origin",
},
],
},
];
},
2025-10-09 19:11:53 +02:00
2025-10-10 16:43:21 +02:00
// Enable experimental features if needed
experimental: {
// turbo is now stable in Next.js 15
// Add other experimental features here if needed
},
turbopack: {
root: ".",
},
};
export default nextConfig;