-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.dll.js
40 lines (37 loc) · 1.05 KB
/
webpack.dll.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
'use strict';
const path = require('path')
, webpack = require('webpack')
, WriteDllStatsPlugin = require('./plugins/write-dll-stats-plugin')
, TerserPlugin = require('terser-webpack-plugin');
module.exports = {
mode: "production",
entry: {
lib: [
"react", "react-dom", "raven-js",
"big.js",
"localforage",
"dompurify",
"highcharts",
"highcharts/modules/exporting", "highcharts/modules/offline-exporting"
]
},
output: {
path: path.resolve('app'),
filename: "[name]_[chunkhash].js",
library: '[name]_vendor'
},
resolve: {
modules: ['local_modules','node_modules']
},
plugins: [
new webpack.DllPlugin({
path: path.join(__dirname, 'dll', '[name]-manifest.json'),
name: '[name]_vendor'
}),
new WriteDllStatsPlugin()
],
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
}
}