generated from violetadev/react-typescript-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
39 lines (38 loc) · 1.19 KB
/
webpack.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
const path = require('path');
const Dotenv = require('dotenv-webpack').config();
module.exports = function (env, argv) {
return {
// resolve: {
mode: env.production ? 'production' : 'development',
alias: {
'@components': path.resolve(`${__dirname}/src/components`),
'@redux': path.resolve(`${__dirname}/src/redux`),
'@layouts': path.resolve(`${__dirname}/src/layouts`),
'@pages': path.resolve(`${__dirname}/src/pages`),
'@styles': path.resolve(`${__dirname}/src/styles`),
'@constants': path.resolve(`${__dirname}/src/constants`),
'@assets': path.resolve(`${__dirname}/src/assets`),
'@hocs': path.resolve(`${__dirname}/src/hocs`),
'@providers': path.resolve(`${__dirname}/src/providers`),
'@lang': path.resolve(`${__dirname}/src/lang`),
'@hooks': path.resolve(`${__dirname}/src/hooks`),
},
// },
// module: {
plugins: [new Dotenv({ path: path.resolve(__dirname, '.env.' + dotenv) })],
rules: [
{
test: /\.svg$/,
use: [
{
loader: 'svg-url-loader',
options: {
limit: 10000,
},
},
],
},
],
// },
};
};