-
Notifications
You must be signed in to change notification settings - Fork 43
/
webpack.config.lib.js
75 lines (71 loc) · 1.56 KB
/
webpack.config.lib.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
const path = require('path');
const merge = require('webpack-merge');
const commonConfig = {
entry: [
'./src/main.js',
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'd3kit-timeline.min.js',
sourceMapFilename: '[file].map',
library: 'd3KitTimeline',
libraryExport: 'default',
libraryTarget: 'umd',
umdNamedDefine: false
},
externals: {
'labella': {
root: 'labella',
commonjs2: 'labella',
commonjs: 'labella',
amd: 'labella'
},
'd3-array': {
root: 'd3',
commonjs2: 'd3-array',
commonjs: 'd3-array',
amd: 'd3-array'
},
'd3-axis': {
root: 'd3',
commonjs2: 'd3-axis',
commonjs: 'd3-axis',
amd: 'd3-axis'
},
'd3-scale': {
root: 'd3',
commonjs2: 'd3-scale',
commonjs: 'd3-scale',
amd: 'd3-scale'
},
'd3-selection': {
root: 'd3',
commonjs2: 'd3-selection',
commonjs: 'd3-selection',
amd: 'd3-selection'
},
'd3-transition': {
root: 'd3',
commonjs2: 'd3-transition',
commonjs: 'd3-transition',
amd: 'd3-transition'
},
'd3-dispatch': {
root: 'd3',
commonjs2: 'd3-dispatch',
commonjs: 'd3-dispatch',
amd: 'd3-dispatch'
},
'd3kit': {
root: 'd3Kit',
commonjs2: 'd3kit',
commonjs: 'd3kit',
amd: 'd3kit'
}
}
};
let config;
const prodConfig = require('lazynerd-devtools/config/webpack/webpack.config.prod.js');
config = merge(prodConfig, commonConfig);
config.plugins = [];
module.exports = config;