68 lines
1.3 KiB
TypeScript
68 lines
1.3 KiB
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
// Optimize for production
|
|
poweredByHeader: false,
|
|
compress: true,
|
|
// Experimental features for better performance
|
|
experimental: {
|
|
// Optimize package imports for common libraries
|
|
optimizePackageImports: [
|
|
"lucide-react",
|
|
"@radix-ui/react-icons",
|
|
"date-fns",
|
|
],
|
|
},
|
|
// Headers for better caching and security
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{
|
|
key: "X-Content-Type-Options",
|
|
value: "nosniff",
|
|
},
|
|
{
|
|
key: "X-Frame-Options",
|
|
value: "DENY",
|
|
},
|
|
{
|
|
key: "Referrer-Policy",
|
|
value: "strict-origin-when-cross-origin",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
source: "/static/(.*)",
|
|
headers: [
|
|
{
|
|
key: "Cache-Control",
|
|
value: "public, max-age=31536000, immutable",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
// Redirects for common paths
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: "/home",
|
|
destination: "/",
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: "/dashboard",
|
|
destination: "/",
|
|
permanent: true,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|