/
.e-config.js
executable file
·121 lines (120 loc) · 3.39 KB
/
.e-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const chalk = require('chalk');
const path = require('path');
module.exports = {
name: 'test',
open: true,
defaultPort: 8001,
projectType: 'ts',
server: '0.0.0.0',
imageInLineSize: 8192,
isTslint: true,
publicPath: '/public/',
devServer: {
noInfo: true,
https: false,
proxy: {
// '/main': {
// target: 'https://uat-scm.hoolinks.com/',
// //changeOrigin: true,
// secure: false,
// onProxyReq: (proxyReq, req, res) => {
// proxyReq.setHeader('host', 'uat-scm.hoolinks.com')
// proxyReq.setHeader('cookie', ' Hm_lvt_c255ba4153ae8ae8b787c209cc7518a8=1553052488,1553052893,1553053026,1553053105; SYSSOURCE=SCM; JSESSIONID=F46353CD405C32BF40B7CC6CC0B4C44D; SCP_JSESSIONID=8221664EFABD7C98FFB74DDC8CC12C85; Hm_lpvt_c255ba4153ae8ae8b787c209cc7518a8=1554866067; SESSION=d2104255-eee1-4299-9d8d-9369d83f0977')
// }
// },
}
},
postcss: {
// px2rem:{
// rootValue: 75,
// unitPrecision: 3,
// },
autoprefixer: {
/**
* 参考dora配置
*/
browsers: [
'last 2 versions',
// "Firefox ESR",
'Firefox >= 15',
'> 1%',
'ie >= 8',
'not ie<=8'
]
}
},
webpack: {
dllConfig: {
/* vendors: { value: ['react'],externalUrl:'http://localhost:8001/public/test/'}, */
vendors: ['react'],
/* customDll: [{ key: 'framework',value: ['invariant','react-dom'],externalUrl: '' }],
compileOptions: {
externalUrl:'http://localhost:8001/public/test/'
} */
},
disableReactHotLoader: false,
commonsChunkPlugin: ['common','vendor'],
plugins: [
new ProgressBarPlugin({
summary: false,
format:
`${chalk.green.bold('build [:bar]')}` +
chalk.green.bold(':percent') +
' (:elapsed seconds)',
summaryContent: ''
})
],
/* optimization: {
splitChunks: {
cacheGroups: {
vendor: {
chunks: "initial",
minChunks: 1,
name: "vendor",
priority: 7,
test: /object-hash|lodash/,
//maxInitialRequests: 5, // The default limit is too small to showcase the effect
minSize: 0 // This is example is too small to create commons chunks
}
}
},
}, */
},
babel: {
query: {
presets: [
[
"@babel/preset-env",
{
/* targets: {
esmodules: true,
}, */
"useBuiltIns": "usage",
"corejs": "3",
}
],
/* "@babel/preset-env", */
"@babel/preset-react"],
cacheDirectory: true,
plugins: [
/* 'babel-plugin-legion-hmr', */
'add-module-exports',
'@babel/plugin-transform-runtime',
["@babel/plugin-proposal-decorators", { "legacy": true }],
// [
// "import",
// [
// {libraryName: "@kad/e-antd"},
// {libraryName: "antd", style: true}
// ]
// ]
['import',{ libraryName: 'antd',style: true }],
]
}
},
htmlWebpackPlugin: {
title: 'webApp' /**/
},
apps: ['app1','app2']
};