-
Notifications
You must be signed in to change notification settings - Fork 1
/
craco.config.js
50 lines (49 loc) · 1.28 KB
/
craco.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
/* eslint-disable no-empty */
const { resolve } = require('path');
const path = require('path');
const webpackResolve = require('craco-webpack-resolve');
const CracoLessPlugin = require('craco-less');
const {
compilerOptions: { paths }
} = require('./tsconfig.json');
module.exports = {
devServer: {
port: 3030
},
webpack: {
alias: {
src: resolve(__dirname, 'src'),
components: resolve(__dirname, 'src/components'),
appConstants: resolve(__dirname, 'src/appConstants'),
containers: resolve(__dirname, 'src/containers'),
contextProvider: resolve(__dirname, 'src/contextProvider'),
hooks: resolve(__dirname, 'src/hooks'),
i18n: resolve(__dirname, 'src/i18n'),
pages: resolve(__dirname, 'src/pages'),
utils: resolve(__dirname, 'src/utils'),
__generated__: resolve(__dirname, 'src/__generated__')
}
},
plugins: [
{
plugin: webpackResolve,
options: {
resolve: {
fallback: {
fs: false,
tls: false,
net: false,
path: false,
zlib: false,
http: false,
https: false,
stream: false,
crypto: false,
url: false
}
}
}
},
{ plugin: CracoLessPlugin }
]
};