An Easy to Understand Webpack 4+ Configuration File with Comments

Configuring Webpack could be a challenging and daunting task for most of us but if you spend sometime researching, reading and watching about the subject, it gets clearer.

Webpack team works hard to make the initial on boarding as easy as possible. Unfortunately, all serious apps requires in-depth configuration. Below you will find my version of Webpack configuration with comments added for each module/loader.

Hope it helps you in your projects.

Also don’t forget to checkout the resources below that helped me in my project.

Survive.js Webpack Book

Webpack 4 Tutorial: from 0 Conf to Production Mode

Webpack Configurator

webpack.config.js &

You may also visit these two files on Gist by clicking here



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store