-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.fatherrc.ts
More file actions
41 lines (40 loc) · 861 Bytes
/
.fatherrc.ts
File metadata and controls
41 lines (40 loc) · 861 Bytes
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
import { IBundleOptions } from 'father-build/src/types';
import { typescriptPaths } from 'rollup-plugin-typescript-paths';
const config: IBundleOptions = {
esm: 'babel',
cjs: 'babel',
umd: {
name: 'lean',
globals: {
react: 'React',
antd: 'antd',
},
},
runtimeHelpers: true,
lessInBabelMode: true,
extractCSS: true,
extraBabelPlugins: [
[
'import',
{
libraryName: 'antd',
libraryDirectory: 'lib',
style: true,
},
'antd',
],
['transform-remove-console', { exclude: ['error', 'warn', 'info'] }],
[
'module-resolver',
{
root: ['.'],
alias: {
'@': './src',
'@@': './src/.umi',
},
},
],
],
extraRollupPlugins: [typescriptPaths({ tsConfigPath: './tsconfig.json' })],
};
export default config;