forked from dnd-side-project/dnd-11th-6-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
45 lines (42 loc) · 892 Bytes
/
next.config.mjs
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
import withPWA from 'next-pwa'
const nextConfig = {
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: false,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'https://cdn.get-snappy.co.kr'.replace(/^https?:\/\//, ''),
port: '',
},
],
},
async rewrites() {
return [
{
source: '/api/v1/:path*',
destination: `https://api.get-snappy.co.kr/api/v1/:path*`,
},
]
},
async headers() {
if (process.env.NODE_ENV === 'development') {
return [
{
source: '/:path*',
headers: [
{ key: 'Cache-Control', value: 'no-store, must-revalidate' },
],
},
]
}
return []
},
}
const pwaConfig = {
dest: 'public',
disable: process.env.NODE_ENV === 'development',
}
export default withPWA(pwaConfig)(nextConfig)