-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.dll.config.js
43 lines (39 loc) · 1.15 KB
/
webpack.dll.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
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: {
'vendor': ["./app/vendor.ts"],
},
output: {
filename: '[name].bundle.js',
path: './build',
library: '[name]_lib',
},
module: {
exprContextCritical: false, //https://github.com/angular/angular/issues/11580
loaders: [
{
test: /material-design-icons.css$/,
loaders: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' })
},
{
test: /\.(jpe?g|png|gif|jpg|eot|woff|ttf|svg|woff2)$/,
loader: "file-loader?name=[name]-[hash].[ext]"
}
]
},
plugins: [
new webpack.DllPlugin({
path: './dll/[name]-manifest.json',
name: '[name]_lib'
}),
new webpack.optimize.UglifyJsPlugin({
debug: false,
minimize: true,
output: {
comments: false
},
}),
new ExtractTextPlugin( {filename: "[name].css", allChunks: true }),
],
}