-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
77 lines (73 loc) · 1.73 KB
/
next.config.js
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
/** @type {import('next').NextConfig} */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const isProduction = process.env.NODE_ENV === "production"
// eslint-disable-next-line @typescript-eslint/no-var-requires
const withPWA = require("next-pwa")({
dest: "public",
disable: typeof window === "undefined" || !isProduction,
sourcemap: !isProduction,
});
//2
// eslint-disable-next-line @typescript-eslint/no-var-requires
const baseNextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "studyabout.s3.ap-northeast-2.amazonaws.com",
},
{
protocol: "https",
hostname: "localhost:3000",
},
{
protocol: "https",
hostname: "user-images.githubusercontent.com",
},
{
protocol: "https",
hostname: "p.kakaocdn.net",
},
{
protocol: "http",
hostname: "p.kakaocdn.net",
},
{
protocol: "https",
hostname: "k.kakaocdn.net",
},
{
protocol: "http",
hostname: "k.kakaocdn.net",
},
{
protocol: "http",
hostname: "t1.kakaocdn.net",
},
{
protocol: "http",
hostname: "img1.kakaocdn.net",
},
],
deviceSizes: [320, 420, 768, 1024, 1200, 1600, 1920],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
compiler: {
styledComponents: true,
},
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "Set-Cookie",
value: "cookieName=cookieValue; Path=/; HttpOnly; Secure; SameSite=None;",
},
],
},
];
},
};
const nextConfig = withPWA(baseNextConfig);
module.exports = nextConfig;