-
Notifications
You must be signed in to change notification settings - Fork 43
/
config-overrides.js
37 lines (35 loc) · 998 Bytes
/
config-overrides.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
/* config-overrides.js */
const {
override,
fixBabelImports,
addLessLoader,
addWebpackAlias,
} = require('customize-cra');
const path = require('path');
const colors = {
'@primary-color': '#6D0FA7',
'@font-family': 'Noto Sans',
'@alert-error-bg-color': '#EB5757',
'@alert-error-icon-color': '#FFFFFF',
'@alert-success-bg-color': '#27AE60',
'@alert-success-icon-color': '#FFFFFF',
};
module.exports = override(
fixBabelImports('import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: colors,
}),
addWebpackAlias({
'@components': path.resolve(__dirname, 'src', 'components'),
'@svg': path.resolve(__dirname, 'src', 'icons', 'svg'),
'@png': path.resolve(__dirname, 'src', 'icons', 'png'),
'@services': path.resolve(__dirname, 'src', 'services'),
'@stores': path.resolve(__dirname, 'src', 'stores'),
'@css': path.resolve(__dirname, 'src', 'css'),
}),
);