Managing webpack configuration can get tough especially if you try to track best practices and optimizations.
To address this problem, Jan Nicklas has come up with a solution in the form of webpack plugins.
As a child, my dad showed QBasic to me, and I got fascinated by the fact that my computer would do everything I told it to - even task which I would not be able to do by myself.
This fascination has never stopped, drove me into studying CS and somehow turned a hobby into my job. By now I have worked for nine years in Germany, Austria, Switzerland, and the US.
In 2015 I discovered that webpack would allow me to write an offline-capable web app, but I had to repeat some manual steps on every change. Because of this, I discovered html-webpack-plugin and eventually became its maintainer.
Webpack provides already very powerful defaults, but to be flexible, it asks you to configure your loaders manually.
webpack-config-plugins offers you multiple presets for your loader configuration to reduce the boilerplate part of setting up webpack.
During the plugin initialization phase, the webpack-config-plugins presets will inject additional loader and plugin configurations to your webpack configuration.
Webpack provides a mode
option which allows you to optimize it for development or productions. webpack-config-plugins uses this mode to decide whether the presets should be optimized for development or production.
There are already excellent boilerplates available. Unfortunately, most of them are opinionated and add another layer of configuration on top of webpack and lock you into that.
webpack-config-plugins is an attempt to break these boilerplates into smaller pieces to allow you to pick the presets you need and to keep you in control but still let you update your loader configurations.
The configuration of a preset is the same you would write into your webpack config manually. Because of this, users should be able to understand or even modify presets quite easily.
Our requirements often led us away from prebuilt boilerplates. However, after some month of development, it was costly to upgrade webpack, webpack plugins and webpack loaders because we didn't have tests for our webpack configurations.
The problem led to the idea of automatically tested webpack configurations to understand which loader or plugin upgrade would influence your build asset results or your build performance.
The automated performance tests seem to provide a lot of value. However, the work on them has just begun, and there is more to be done.
Try to find a small design or app that YOU really would like to build and start.
Your first work doesn't need to be perfect, and you will learn a lot from your mistakes keep going until you reached your goal :)
Even Stensberg (@evenstensberg) works hard at the webpack-cli.
Thanks for the interview Jan! I think packaging webpack best practices into plugins is a worthwhile idea. The approach is flexible enough to let users pick only the presets they find valuable while maintaining the rest on their own.
[Check out webpack-config-plugins on GitHub to learn more!](https://github.com/namics/webpack-config-plugins) See also [the online app that helps you to choose the right presets](https://webpack-config-plugins.js.org/).