-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.js
40 lines (39 loc) · 1.09 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
/** @type {import('next').NextConfig} */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
module.exports = {
async rewrites() {
return [
{
source: '/api/:path*',
destination: `${process.env.SERVER_URL}/:path*`,
},
];
},
async redirects() {
return [
{ source: '/oauth/kakao', destination: '/auth/oauth', permanent: true },
{ source: '/oauth/google', destination: '/auth/oauth', permanent: true },
];
},
reactStrictMode: true,
webpack(config) {
config.resolve = {
alias: {
'@lib': path.resolve(__dirname, './lib'),
'@hooks': path.resolve(__dirname, './hooks'),
'@styles': path.resolve(__dirname, './styles'),
types: path.resolve(__dirname, './types'),
'@components': path.resolve(__dirname, './components'),
'@containers': path.resolve(__dirname, './containers'),
},
...config.resolve,
};
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
});
return config;
},
};