-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.ts
More file actions
98 lines (95 loc) · 2.26 KB
/
next.config.ts
File metadata and controls
98 lines (95 loc) · 2.26 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// next.config.ts
import type { NextConfig } from 'next';
import type { Configuration as WebpackConfig } from 'webpack';
const nextConfig: NextConfig = {
reactCompiler: true,
images: {
//이미지 경로는 사양에 맞게 수정하여 적용
remotePatterns: [
{
protocol: 'https',
hostname: 'we-go-bucket.s3.ap-northeast-2.amazonaws.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
},
{
protocol: 'https',
hostname: 'plus.unsplash.com',
},
{
protocol: 'https',
hostname: 'we-go-bucket.s3.ap-northeast-2.amazonaws.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
},
],
//imagesSizes, deviceSizes는 기본 설정
imageSizes: [96, 128, 256, 384],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
qualities: [100],
},
turbopack: {
rules: {
'*.svg': {
loaders: [
{
loader: '@svgr/webpack',
options: {
icon: true,
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false, // viewBox 유지
},
},
},
'removeDimensions', // width, height 제거
],
},
},
},
],
as: '*.js',
},
},
},
// Webpack 설정
webpack(config: WebpackConfig) {
config.module?.rules?.push({
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
options: {
icon: true,
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
},
},
},
'removeDimensions',
],
},
},
},
],
});
return config;
},
};
export default nextConfig;