-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
87 lines (85 loc) · 2.26 KB
/
Copy pathnext.config.js
File metadata and controls
87 lines (85 loc) · 2.26 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/** @type {import('next').NextConfig} */
const nextConfig = {
logging: {
fetches: {
fullUrl: true,
},
},
compiler: {
styledComponents: true,
},
images: {
// limit of 25 deviceSizes values
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
// limit of 25 imageSizes values
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
// limit of 50 domains values (deprecated)
domains: [],
// path prefix for Image Optimization API, useful with `loader`
path: "/_next/image",
// loader can be 'default', 'imgix', 'cloudinary', 'akamai', or 'custom'
loader: "default",
// file with `export default function loader({src, width, quality})`
loaderFile: "",
// disable static imports for image files
disableStaticImages: false,
// minimumCacheTTL is in seconds, must be integer 0 or more
minimumCacheTTL: 60,
// ordered list of acceptable optimized image formats (mime types)
formats: ["image/avif", "image/webp"],
// enable dangerous use of SVG images
dangerouslyAllowSVG: false,
// set the Content-Security-Policy header
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
// sets the Content-Disposition header (inline or attachment)
contentDispositionType: "inline",
// limit of 50 objects
remotePatterns: [
{
protocol: "https",
hostname: "image.tmdb.org",
},
{
protocol: "https",
hostname: "assets.nflxext.com",
},
{
protocol: "https",
hostname: "lh3.googleusercontent.com",
},
{
protocol: "https",
port: "",
hostname: "avatars.githubusercontent.com",
},
],
// when true, every image will be unoptimized
// unoptimized: false,
loader: "default",
},
experimental: {
webVitalsAttribution: ["CLS", "LCP"],
turbo: {
resolveExtensions: [
".mdx",
".tsx",
".ts",
".jsx",
".js",
".mjs",
".json",
],
},
optimizePackageImports: ["lucide-react", "react-icons/*"],
},
async redirects() {
return [
{
source: "/old-path",
destination: "/new-path",
permanent: true,
},
];
},
};
module.exports = nextConfig;