-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.js
60 lines (56 loc) Β· 1.92 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
51
52
53
54
55
56
57
58
59
60
/** @type {import('next').NextConfig} */
const path = require('path');
const nextConfig = {
reactStrictMode: true,
images: {
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
domains: [
'cau-like-lion.s3.ap-northeast-2.amazonaws.com',
'chunghahaha.s3.ap-northeast-2.amazonaws.com',
'd1sgygn8l0lfd5.cloudfront.net',
'dcpshnp4boilw.cloudfront.net',
'd1e39uzon1ymuo.cloudfront.net',
],
},
webpack(config) {
config.resolve = {
alias: {
'@common': path.resolve(__dirname, 'src/components/common'),
'@home': path.resolve(__dirname, 'src/components/home'),
'@gallery': path.resolve(__dirname, 'src/components/gallery'),
'@project': path.resolve(__dirname, 'src/components/project'),
'@session': path.resolve(__dirname, 'src/components/session'),
'@signup': path.resolve(__dirname, 'src/components/signup'),
'@login': path.resolve(__dirname, 'src/components/login'),
'@attendance': path.resolve(__dirname, 'src/components/attendance'),
'@mypage': path.resolve(__dirname, 'src/components/mypage'),
'@archiving': path.resolve(__dirname, 'src/components/archiving'),
'@pages': path.resolve(__dirname, 'src/pages'),
'@styles': path.resolve(__dirname, 'src/styles'),
'@utils': path.resolve(__dirname, 'src/utils'),
'@@types': path.resolve(__dirname, 'src/types'),
'@image': path.resolve(__dirname, 'public/image'),
},
...config.resolve,
};
config.module.rules.push({
test: /\.mp4$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
},
},
],
});
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
});
return config;
},
};
module.exports = nextConfig;