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
+5 -4
View File
@@ -6,18 +6,19 @@
"author": "Bachir Soussi Chiadmi <bachir@g-u-i.me>", "author": "Bachir Soussi Chiadmi <bachir@g-u-i.me>",
"license": "GPL-3.0", "license": "GPL-3.0",
"devDependencies": { "devDependencies": {
"extract-text-webpack-plugin": "^2.1.0", "extract-text-webpack-plugin": "^3.0.2",
"webpack": "^2.3.3" "uglifyjs-webpack-plugin": "^1.1.6",
"webpack": "^3.10.0"
}, },
"dependencies": { "dependencies": {
"css-loader": "^0.28.0", "css-loader": "^0.28.0",
"file-loader": "^0.11.1", "file-loader": "^1.1.6",
"jquery": "^3.2.1", "jquery": "^3.2.1",
"markdown-it": "^8.3.1", "markdown-it": "^8.3.1",
"markdown-it-footnote": "^3.0.1", "markdown-it-footnote": "^3.0.1",
"mithril": "^1.1.1", "mithril": "^1.1.1",
"node-sass": "^4.5.3", "node-sass": "^4.5.3",
"normalize.css": "^6.0.0", "normalize.css": "^8.0.0",
"sass-loader": "^6.0.3" "sass-loader": "^6.0.3"
} }
} }
+14 -4
View File
@@ -8,6 +8,7 @@
*/ */
var webpack = require('webpack'); var webpack = require('webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = { module.exports = {
@@ -23,7 +24,7 @@ module.exports = {
{ {
// regular css files // regular css files
test: /\.css$/, test: /\.css$/,
use: ExtractTextPlugin.extract({ loader: 'css-loader?importLoaders=1', }), use: ExtractTextPlugin.extract({ use: 'css-loader?importLoaders=1', }),
}, },
{ {
// sass / scss loader for webpack // sass / scss loader for webpack
@@ -42,11 +43,20 @@ module.exports = {
// define where to save the file // define where to save the file
filename: '[name].css', allChunks: true, filename: '[name].css', allChunks: true,
}), }),
new webpack.optimize.UglifyJsPlugin({ new UglifyJsPlugin({
compress: { sourceMap: true,
warnings: false uglifyOptions: {
ecma: 8,
compress: {
warnings: false
},
} }
}) })
// new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
// })
], ],
watch: true watch: true
}; };
+1344 -498
View File
File diff suppressed because it is too large Load Diff