forked from cBioPortal/cbioportal-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vendor-bundles.webpack.config.js
71 lines (61 loc) · 1.85 KB
/
vendor-bundles.webpack.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
const webpack = require('webpack');
const path = require('path');
// we don't need sourcemaps on circleci
const sourceMap = process.env.DISABLE_SOURCEMAP ? '' : 'source-map';
const config = {
entry: {
// create two library bundles, one with jQuery and
// another with Angular and related libraries
common: [
'jquery',
'imports-loader?jquery=jquery!jquery-migrate',
'react',
'react-dom',
'react-bootstrap',
'seamless-immutable',
'lodash',
'mobx',
'mobx-react',
'victory',
'react-select',
'react-rangeslider',
'mobx-utils',
'd3',
'datatables.net',
'webpack-raphael',
'pluralize',
'react-if',
'react-select1',
'igv',
'jstat',
],
},
module: {
rules: [{ test: /lodash/, loader: 'imports-loader?define=>false' }],
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'common-dist'),
// The name of the global variable which the library's
// require() function will be assigned to
library: '[name]_lib',
},
devtool: sourceMap,
plugins: [],
};
config.resolve = {
modules: [path.join('src', 'common'), 'node_modules'],
};
config.plugins = [
new webpack.DllPlugin({
// The path to the manifest file which maps between
// modules included in a bundle and the internal IDs
// within that bundle
path: 'common-dist/[name]-manifest.json',
// The name of the global variable which the library's
// require function has been assigned to. This must match the
// output.library option above
name: '[name]_lib',
}),
];
module.exports = config;