-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-overrides.js
More file actions
35 lines (34 loc) · 1.05 KB
/
config-overrides.js
File metadata and controls
35 lines (34 loc) · 1.05 KB
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
const {
override,
addDecoratorsLegacy,
useEslintRc,
// addBundleVisualizer,
addWebpackAlias,
addLessLoader,
// eslint-disable-next-line no-unused-vars
fixBabelImports
} = require('customize-cra');
const path = require('path');
module.exports = override(
addDecoratorsLegacy(), // 装饰器支持
useEslintRc(), // 使用eslint配置文件
addLessLoader({ // less 配置
strictMath: true,
noIeCompat: true,
javascriptEnabled: true
}),
// fixBabelImports('import', { // antd 模块化加载
// libraryName: 'antd',
// libraryDirectory: 'es',
// style: true
// }),
// addBundleVisualizer(),
addWebpackAlias({ // alias
common: path.resolve(__dirname, 'src/common'),
img: path.resolve(__dirname, 'src/common/img'),
svg: path.resolve(__dirname, 'src/common/svg'),
views: path.resolve(__dirname, 'src/views'),
apis: path.resolve(__dirname, 'src/api'),
axios2$: path.resolve(__dirname, 'src/common/js/axios2.js')
})
);