-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.mjs
47 lines (46 loc) · 1.11 KB
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 's3.ap-northeast-2.amazonaws.com',
pathname: '/gsainfoteam-ziggle-notice-images-production/*',
},
{
protocol: 'https',
hostname: 's3.ap-northeast-2.amazonaws.com',
pathname: '/gsainfoteam-ziggle-notice-images-staging/*',
},
],
},
webpack: (config) => {
config.externals = [
...(Array.isArray(config.externals) ? config.externals : []),
'jsdom',
'debug',
'node-fetch',
];
config.module ??= {};
config.module.rules ??= [];
config.module.rules.push(
{
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
options: {
svgoConfig: {
plugins: [{ name: 'removeViewBox', active: false }],
},
},
},
],
},
{ test: /\.graphql$/, use: [{ loader: 'graphql-tag/loader' }] },
);
return config;
}
};
export default nextConfig;