forked from codeit-bootcamp-frontend/5-Weekly-Mission
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
64 lines (61 loc) · 1.4 KB
/
next.config.js
File metadata and controls
64 lines (61 loc) · 1.4 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
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
const externalImages = [
{
hostname: "https://codeit-images.codeit.com",
pathname: "/badges/COMPLETE_100_LESSONS.png",
},
{
hostname: "codeit-frontend.codeit.com",
pathname: "/static/images/brand/og_tag.png",
},
{
hostname: "reactjs.org",
pathname: "/logo-og.png",
},
{
hostname: "assets.vercel.com",
pathname: "/image/upload/front/nextjs/twitter-card.png",
},
{
hostname: "tanstack.com",
pathname: "/build/_assets/**",
},
{
hostname: "storybook.js.org",
pathname: "/images/social/og-home.jpg",
},
{
hostname: "testing-library.com",
pathname: "/img/octopus-128x128.png",
},
{
hostname: "static.cdninstagram.com",
pathname: "/rsrc.php/v3/yt/r/30PrGfR3xhB.png",
},
{
hostname: "s.pstatic.net",
pathname: "/static/www/mobile/edit/2016/0705/mobile_212852414260.png",
},
];
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
webpack(config) {
// NOTE: SVG 파일을 React 컴포넌트로 불러오기 위한 설정 추가
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],
});
return config;
},
images: {
remotePatterns: externalImages.map(({ hostname, pathname }) => {
return {
protocol: "https",
hostname: hostname,
port: "",
pathname: pathname,
};
}),
},
};
module.exports = nextConfig;