Skip to content

Commit

Permalink
Added UglifyJS plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainer Simon committed May 1, 2020
1 parent 13a129c commit cb45ce1
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
57 changes: 57 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"sass-loader": "^8.0.0",
"serialize-javascript": "^2.1.2",
"style-loader": "^1.0.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.1"
Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path');
const fs = require('fs');

const HtmlWebpackPlugin = require('html-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

const APP_DIR = fs.realpathSync(process.cwd());

Expand All @@ -18,6 +19,9 @@ module.exports = {
performance: {
hints: false
},
optimization: {
minimizer: [ new UglifyJsPlugin() ],
},
resolve: {
extensions: ['.js', '.jsx'],
alias: {
Expand Down

0 comments on commit cb45ce1

Please sign in to comment.