-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
71 lines (67 loc) · 1.64 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
/** @type {import('next').NextConfig} */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withSentryConfig } = require('@sentry/nextjs');
const nextConfig = {
reactStrictMode: true,
images: {
domains: ['github.com'], // mock image로 테스트 하기 위한 config입니다. 추후에 제거 예정
},
experimental: {
typedRoutes: true,
},
// 웹팩을 통해 svg 파일을 리액트 컴포넌트로 변환하는 설정
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
async rewrites() {
return [
{
source: '/api/:path*',
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`,
},
];
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: `${process.env.NEXT_PUBLIC_REMOTE_HOST}`,
pathname: '/images/**',
},
{
protocol: 'https',
hostname: 'github.com',
pathname: '/depromeet/amazing3-fe/assets/**',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
},
{
protocol: 'https',
hostname: 'ssl.pstatic.net',
},
{
protocol: 'https',
hostname: 'phinf.pstatic.net',
},
{
protocol: 'https',
hostname: 'k.kakaocdn.net',
},
{
protocol: 'http',
hostname: 'k.kakaocdn.net',
},
],
},
};
const sentryWebpackPluginOptions = {
silent: true,
authToken: process.env.NEXT_PUBLIC_SENTRY_AUTH_TOKEN,
};
module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions);