-
Notifications
You must be signed in to change notification settings - Fork 0
/
dll.webpack.config.js
43 lines (39 loc) · 1.04 KB
/
dll.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
const webpack = require('webpack');
const path = require('path');
/* eslint-disable max-len */
const isProduction = typeof process.env.PRODUCTION !== 'undefined';
console.log((isProduction ? 'Production' : 'Test') + ' build ...');
const distPath = isProduction ? './dist/compiled/' : './dist/chrome/';
module.exports = {
entry: {
common: [
'core-decorators',
'lodash',
'whatwg-fetch',
'jquery',
'cheerio',
'socket.io-client', 'socket.io-p2p',
],
content: [
'react', 'react-dom', 'react-redux', 'redux', 'redux-logger', 'redux-promise', 'redux-thunk',
'style-loader',
'html2canvas',
/*'jquery-inview',*/ 'mousetrap', 'tiny-cookie',
],
},
output: {
filename: '[name].dll.js',
path: path.join(__dirname, distPath),
library: '[name]_lib',
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
beautify: false,
comments: false,
}),
new webpack.DllPlugin({
path: distPath + '[name]-manifest.json',
name: '[name]_lib',
}),
],
};