forked from pacoccino/stellar-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.plugins.js
35 lines (33 loc) · 871 Bytes
/
webpack.plugins.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
const { webpack } = require('@webpack-blocks/webpack2')
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
exports.basePlugins = [
new CopyWebpackPlugin([
{ from: './content' },
]),
new HtmlWebpackPlugin({
inject: true,
template: './content/index.html'
}),
new webpack.IgnorePlugin(/ed25519/)
];
exports.productionPlugins = [
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}),
// new webpack.optimize.DedupePlugin(), // TODO: Does not work w/ webpack 2 yet... :-/
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
output: {
comments: false
},
screwIe8: true,
sourceMap: false
}),
new webpack.optimize.CommonsChunkPlugin({
names: ['vendor'] // Specify the common bundle's name.
})
];