updated webpack dependencies to latest

https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/104#issuecomment-358646531
This commit is contained in:
Bachir Soussi Chiadmi
2018-02-10 12:00:32 +01:00
parent f45f05be04
commit 246f0ac078
3 changed files with 1363 additions and 506 deletions
+14 -4
View File
@@ -8,6 +8,7 @@
*/
var webpack = require('webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
@@ -23,7 +24,7 @@ module.exports = {
{
// regular css files
test: /\.css$/,
use: ExtractTextPlugin.extract({ loader: 'css-loader?importLoaders=1', }),
use: ExtractTextPlugin.extract({ use: 'css-loader?importLoaders=1', }),
},
{
// sass / scss loader for webpack
@@ -42,11 +43,20 @@ module.exports = {
// define where to save the file
filename: '[name].css', allChunks: true,
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
new UglifyJsPlugin({
sourceMap: true,
uglifyOptions: {
ecma: 8,
compress: {
warnings: false
},
}
})
// new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
// })
],
watch: true
};