Browse Source

updated webpack dependencies to latest
https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/104#issuecomment-358646531

Bachir Soussi Chiadmi 6 years ago
parent
commit
246f0ac078
3 changed files with 458 additions and 168 deletions
  1. 5 4
      package.json
  2. 14 4
      webpack.config.js
  3. 439 160
      yarn.lock

+ 5 - 4
package.json

@@ -6,18 +6,19 @@
   "author": "Bachir Soussi Chiadmi <bachir@g-u-i.me>",
   "license": "GPL-3.0",
   "devDependencies": {
-    "extract-text-webpack-plugin": "^2.1.0",
-    "webpack": "^2.3.3"
+    "extract-text-webpack-plugin": "^3.0.2",
+    "uglifyjs-webpack-plugin": "^1.1.6",
+    "webpack": "^3.10.0"
   },
   "dependencies": {
     "css-loader": "^0.28.0",
-    "file-loader": "^0.11.1",
+    "file-loader": "^1.1.6",
     "jquery": "^3.2.1",
     "markdown-it": "^8.3.1",
     "markdown-it-footnote": "^3.0.1",
     "mithril": "^1.1.1",
     "node-sass": "^4.5.3",
-    "normalize.css": "^6.0.0",
+    "normalize.css": "^8.0.0",
     "sass-loader": "^6.0.3"
   }
 }

+ 14 - 4
webpack.config.js

@@ -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
 };

File diff suppressed because it is too large
+ 439 - 160
yarn.lock


Some files were not shown because too many files changed in this diff