Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
Update to use terser 4 and remove deprecated webpack uglify minifer per
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHowa committed Oct 17, 2020
1 parent df679cc commit 02d65d0
Show file tree
Hide file tree
Showing 3 changed files with 2,190 additions and 1,676 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"core-js": "2",
"terser-webpack-plugin": "4.2.3",
"css-loader": "^3.4.1",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
Expand All @@ -42,7 +43,6 @@
"prettier": "^1.19.1",
"style-loader": "^1.1.2",
"stylelint-config-recommended": "^3.0.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.10.1"
Expand Down
7 changes: 3 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

Expand Down Expand Up @@ -53,9 +53,8 @@ module.exports = {
contentBase: path.join(__dirname, 'public'),
},
optimization: {
// via https://stackoverflow.com/questions/49053215/webpack-4-how-to-configure-minimize
minimizer: [new UglifyJsPlugin()],
noEmitOnErrors: true,
minimize: true,
minimizer: [new TerserPlugin()],
},
plugins: [
// via https://www.netlify.com/blog/2017/11/30/starting-with-webpack-from-scratch/
Expand Down

0 comments on commit 02d65d0

Please sign in to comment.