-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.mjs
More file actions
39 lines (35 loc) · 1.05 KB
/
next.config.mjs
File metadata and controls
39 lines (35 loc) · 1.05 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
const nextConfig = {
async rewrites() {
return [
{
source: '/danum-backend/:slug*',
destination: `${process.env.NEXT_PUBLIC_BASE_URL}/:slug*`,
},
];
},
// 이미지 호스트 설정 (S3 버킷과 CloudFront)
images: {
remotePatterns: [
{
protocol: 'https',
hostname:
'danum-bucket.s3.ap-northeast-2.amazonaws.com',
pathname: '**',
},
{
protocol: 'https',
hostname: 'd1v2wety3l5yaa.cloudfront.net', // CloudFront 도메인 추가
pathname: '**',
},
],
},
// Webpack 설정 추가
webpack(config) {
config.module.rules.push({
test: /\.svg$/, // .svg 파일을 감지
use: ['@svgr/webpack'], // svgr을 사용하여 SVG를 React 컴포넌트로 변환
});
return config; // 수정된 Webpack 설정 반환
},
};
export default nextConfig;