<commit_before># Automatic Entry

## Because manual entry is laborious...<commit_msg>Plugin funs documentation<commit_after># Plugins

## Fun stuff after the fact

Webpack allows you to tap into plugins, which handles the output after the bundles are created.  Think of it as "I want to do something with the glob of code prior to it being written to file."

You can check out [a list of plugins at your disposle](https://github.com/webpack/docs/wiki/list-of-plugins) here.  Most are very easy to integrate as they're essentially their own modules with a set of configurations you can pass to them.  For this demo, I am going to show you how to use the more popular and anticipated plugin, uglify (because our bundles are HUUUUUGEE).

```bash
webpack
```

Check the outcome in dist/.  The output is now unreadable, but also very tiny #minificationFTW.  If you comment out the plugin declaration in webpack.config.js, you can get the legible output again.

This is ideal for production (yes, you will eventually maintain multiple copies of webpack config files at some point in your project) because as your project and list of dependencies grow, the compilation step becomes slower.

## Are we there yet?

```js
cd ../13-code_splitting
```
{'fraction_non_alphanumeric': 0.06053268765133172, 'fraction_numerical': 0.0016142050040355124, 'mean_word_length': 4.299145299145299, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4018370', 'n_tokens_mistral': 326, 'n_tokens_neox': 310, 'n_words': 187}