forked from nyashaushe/Color-Tech
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
46 lines (44 loc) · 1.49 KB
/
next.config.ts
File metadata and controls
46 lines (44 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// basePath: '/Color-Tech', // Commented out for local development
reactStrictMode: true, // Recommended for identifying potential problems
images: {
remotePatterns: [
{
protocol: "https",
hostname: "images.unsplash.com",
},
{
protocol: "https",
hostname: "via.placeholder.com",
},
{
protocol: "https",
hostname: "rystv5mdesdms7cf.public.blob.vercel-storage.com",
pathname: "/**",
},
{
protocol: "https",
hostname: "res.cloudinary.com",
pathname: "/**",
},
],
// Image optimization settings for better performance
formats: ["image/webp", "image/avif"],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
minimumCacheTTL: 60, // Cache images for at least 60 seconds
dangerouslyAllowSVG: true, // Allow SVG optimization for fallback images
contentSecurityPolicy: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self'; sandbox;",
unoptimized: false,
// Loader configuration for better Cloudinary integration
loader: "default",
// Configure allowed quality values
qualities: [75, 80, 85, 90, 95, 100],
},
compiler: {
// Remove all console.log messages in production builds
removeConsole: process.env.NODE_ENV === "production",
},
};
export default nextConfig;