forked from DOI-ONRR/doi-extractives-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (27 loc) · 809 Bytes
/
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
// jshint node: true
var webpack = require('webpack');
var env = process.env.NODE_ENV;
var config = {
entry: {
'main.min': './js/src/main.js',
'narrative.min': './js/src/narrative.js',
'explore.min': './js/src/explore.js',
'homepage.min': './js/src/homepage.js',
'state-pages.min': './js/src/state-pages.js',
'company-revenue.min': './js/src/company-revenue.js',
'reconciliation.min': './js/src/reconciliation.js',
'search.min': './js/src/search.js',
},
output: {
path: __dirname + '/js/lib',
filename: '[name].js',
chunkFilename: '[id].js'
},
plugins: []
};
if (env === 'production') {
var uglify = new webpack.optimize.UglifyJsPlugin({minimize: true});
config.plugins.push(uglify);
config.devtool = 'source-map';
}
module.exports = config;