-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.cjs
30 lines (30 loc) · 1.14 KB
/
webpack.config.cjs
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
module.exports = (env, options) => {
return {
entry: {
'echarts-waterfall': __dirname + '/index.js'
},
output: {
libraryTarget: 'umd',
library: ['echarts-waterfall'],
path: __dirname + '/dist',
filename: options.mode === 'production' ? '[name].min.js' : '[name].js'
},
optimization: {
concatenateModules: true
},
devtool: 'source-map',
externals: {
'echarts/lib/echarts': 'echarts/lib/echarts',
'zrender/lib/core/util': 'zrender/lib/core/util',
'zrender/lib/graphic/helper/subPixelOptimize': 'zrender/lib/graphic/helper/subPixelOptimize',
'zrender/lib/core': 'zrender/lib/core',
'zrender/lib/graphic/Path': 'zrender/lib/graphic/Path',
'zrender/lib/core/platform': 'zrender/lib/core/platform',
'echarts/lib/data': 'echarts/lib/data',
'echarts/lib/chart/helper/labelHelper': 'echarts/lib/chart/helper/labelHelper',
'echarts/lib/label/labelStyle': 'echarts/lib/label/labelStyle',
'echarts/lib/chart/helper/whiskerBoxCommon': 'echarts/lib/chart/helper/whiskerBoxCommon',
'echarts/lib/util/states': 'echarts/lib/util/states',
}
};
};