-
Notifications
You must be signed in to change notification settings - Fork 16
/
next.config.js
41 lines (35 loc) · 1.12 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
require('dotenv').config();
const path = require('path');
const Dotenv = require('dotenv-webpack');
module.exports = {
webpack: (config) => {
config.plugins = config.plugins || [];
config.plugins.push(
new Dotenv({
path: path.join(__dirname, '.env'),
systemvars: true,
})
);
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
config.resolve = {
...config.resolve,
alias: {
...config.resolve.alias,
'@components': path.resolve(__dirname, 'src/components'),
'@helpers': path.resolve(__dirname, 'src/helpers'),
'@styles': path.resolve(__dirname, 'src/styles'),
'@middleware': path.resolve(__dirname, 'src/middleware'),
'@hooks': path.resolve(__dirname, 'src/hooks'),
'@lib': path.resolve(__dirname, 'src/lib'),
'@static': path.resolve(__dirname, 'src/static'),
'@schemas': path.resolve(__dirname, 'src/schemas'),
'@stores': path.resolve(__dirname, 'src/stores'),
'@contexts': path.resolve(__dirname, 'src/contexts'),
},
};
return config;
},
};