An Easy to Understand Webpack 4+ Configuration File with Comments

Timur Catakli
Apr 27, 2018 · 1 min read
Image for post
Image for post
“Man wearing headphones at desk with window view of sunset in background” by Simon Abrams on Unsplash

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 & webpack.parts.js

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

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

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