Minification

Start off by minifying and uglifying our code. Uglifying..? What the hell is that supposed to mean? Are we gonna let a T-Rex eat and squack it out? Allow me to give you an excellent explanation found on Quora.

Let’s install a webpack plugin called uglifyjs-webpack-plugin

We have done this before… Try to figure this one out before moving on. We install it via npm.

Ready? Let’s gooooooooooo

npm i uglifyjs-webpack-plugin --save-dev

Now we require() it and new it up and all done!

Call the plugin with new special keyword.

All done! Time to test it! You can delete our output.js and run webpack once again.

Now we should have something like this