-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
87 lines (83 loc) · 2.12 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
78
79
80
81
82
83
84
85
86
87
/** @type {import('next').NextConfig} */
const isProduction = process.env.NODE_ENV === 'production';
const path = require('path');
const withPlugins = require('next-compose-plugins');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true', // 환경변수 ANALYZE가 true일 때 실행
openAnalyzer: true, // 브라우저에 자동으로 분석결과를 새 탭으로 Open
});
const withPWA = require('next-pwa')({
dest: 'public',
disable: !isProduction,
runtimeCaching: [],
});
const nextConfig = {
reactStrictMode: true,
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'dthumb-phinf.pstatic.net',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'cafeptthumb-phinf.pstatic.net',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'blogpfthumb-phinf.pstatic.net',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'placehold.co',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'ssl.pstatic.net',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'cdn.discordapp.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'rerurureruru.com',
port: '',
pathname: '/**',
},
],
},
env: {
NEXT_PUBLIC_GA_ID: process.env.NEXT_PUBLIC_GA_ID,
},
rewrites: async () => {
return [
// 개발 환경을 위한 proxy 설정입니다.
// {
// source: `${process.env.NEXT_PUBLIC_REDIRECT_URL}/:path*`,
// destination: `${process.env.NEXT_PUBLIC_SERVER_URL}/:path*`,
// },
// vercel 배포용 설정입니다.
{
source: `/api2/:path*`,
destination: `https://rerurureruru.com/:path*`,
},
];
},
};
module.exports = withPlugins([withPWA, withBundleAnalyzer], nextConfig);