-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dll.js
44 lines (39 loc) · 1019 Bytes
/
webpack.config.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
41
42
43
44
const webpack = require('webpack');
const path = require('path');
const outputPath = path.resolve('dll');
module.exports = {
mode: 'development',
entry: {
libs: [
'react',
'react-dom',
'react-router',
'redux',
'react-redux',
'react-hot-loader',
'react-router-dom',
'redux-thunk',
'reselect',
'd3',
],
},
output: {
filename: '[name].dll.js',
path: outputPath,
// The name of the global variable which the library's
// require() function will be assigned to
library: '[name]_dll',
},
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: 'dll/[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]_dll',
}),
],
};