DEV Community

Cover image for How I Got Over My Fear of webpack

How I Got Over My Fear of webpack

Gilad Bar on January 11, 2020

Disclaimer: this is not a webpack tutorial; there are plenty of those out there. Without a doubt, using webpack and understanding what it does h...
Collapse
 
pavelloz profile image
Paweł Kowalski

I think a lot of people fear webpack because of opinions from versions <3. Now, with version 4+ there is literally even zero config.

Slap your js into src/index.js, do your thing, run npx webpack-cli and it will spit out results to dist/main.js (afair).

This is the most basic webpack usage. No babel, no loaders, no preprocessors, just resolving, bundling, and with optimizations if used with --mode=production.

I must say, i jumped on the webpack wagon pretty early (somewhere in 1.x), learning curve was steep, i still sometimes feel its magic (especially when it comes to cacheGroups thingy ;)), but this is hands down, the best thing i learned for frontend development (im performance oriented).

Collapse
 
gomugilad6 profile image
Gilad Bar

Hey Pawel, I actually started my Webpack experience with version 4 and was still afraid ;)
The learning curve wasn't too steep though.
And yes, the boost to my frontend knowledge thanks to Webpack was amazing!

Collapse
 
x777 profile image
YD

Yesterday I found cool video playlist about basics of Webpack - youtu.be/3On5Z0gjf4U

Collapse
 
john2220 profile image
John Raptis

Great post man. I have put off learning Webpack for quite some time now. Time to take a deep dive.
Cheers

Collapse
 
gomugilad6 profile image
Gilad Bar

Thanks man! I get you, it's definitely worth the while

Collapse
 
gomugilad6 profile image
Gilad Bar

Thanks man! Yes, I actually used Parcel for a while, but webpack did its educational part