Webpack 101

I’m not going to approach this like

That's the configuration file, copy and paste it into your root folder, and everything will just be fine!

Instead we’re going to build a webpack configuration step by step together. We need to understand what we want to achieve with every single setting. I won’t talk about webpack in the abstract, or about a webpack feature as a stand alone piece; instead we’re actually going to build a simple single page application, and everytime we’ll change something into webpack configuration, immediately we’ll see how this change affects our bundle, and our application.

Recently I’ve started using webpack 2.

That’s a collection of things I’ve learned; most of this applies also to webpack 1, cause I tried to keep the focus not just on the hows, but most importantly on the whys of the choices.

If you’re new to webpack, hopefully this will be useful to you too.

AD, please don't block.