-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
50 lines (47 loc) · 1.33 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
/** @type {import('next').NextConfig} */
const path = require('path');
const withInterceptStdout = require('next-intercept-stdout');
const prod = process.env.NODE_ENV === 'production';
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
compiler: {
removeConsole: prod,
styledComponents: {
ssr: true,
fileName: true,
displayName: true,
pure: true,
},
},
webpack(config) {
config.resolve = {
alias: {
'@pages': path.resolve(__dirname, 'pages'),
'@styles': path.resolve(__dirname, 'styles'),
'@api': path.resolve(__dirname, 'src/api'),
'@components': path.resolve(__dirname, 'src/components'),
'@constants': path.resolve(__dirname, 'src/constants'),
'@hooks': path.resolve(__dirname, 'src/hooks'),
'@react-query': path.resolve(__dirname, 'src/react-query'),
'@recoil': path.resolve(__dirname, 'src/recoil'),
'@types': path.resolve(__dirname, 'src/types'),
},
...config.resolve,
};
return config;
},
env: {
BASE_URL: process.env.NEXT_PUBLIC_BASE_URL,
},
images: {
domains: [
'kr.object.ncloudstorage.com',
'www.jeju.go.kr',
'www.visitjeju.net',
],
},
};
module.exports = withInterceptStdout(nextConfig, (text) =>
text.includes('Duplicate atom key') ? '' : text,
);