forked from chenxiaolei/ZLMediaKit_NVR_UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-overrides.js
36 lines (28 loc) · 915 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
const path = require('path');
const {override, useEslintRc, fixBabelImports, addBabelPresets, addBabelPlugins, addWebpackResolve, addLessLoader, addDecoratorsLegacy} = require('customize-cra');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
module.exports = override(
useEslintRc(),
addLessLoader({
javascriptEnabled: true,
modifyVars: {
'@primary-color': "#4777e8",
'@link-color': '#4777e8',
},
}),
addWebpackResolve({
alias: {'@': path.resolve(__dirname, 'src')}
}),
addBabelPlugins(
"@babel/plugin-syntax-object-rest-spread",
['@babel/plugin-proposal-decorators', {'legacy': true}]
),
addBabelPresets([
'@emotion/babel-preset-css-prop'
]),
fixBabelImports('antd', {
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
}),
);