No video

Module Bundlers Explained... Webpack, Rollup, Parcel, and Snowpack

  Рет қаралды 465,190

Fireship

Fireship

3 жыл бұрын

What is a Module Bundler? And why do I need one? Learn how tools like Webpack, Rollup, Parcel, and Snowpack can package your code as a production-ready web application. fireship.io
Webpack webpack.js.org/
Snowpack www.snowpack.dev/
Sponsor me for $1 github.com/codediodeio
#webdev #tutorial #javascript
Install the quiz app 🤓
iOS itunes.apple.com/us/app/fires...
Android play.google.com/store/apps/de...
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
My VS Code Theme
- Atom One Dark
- vscode-icons
- Fira Code Font

Пікірлер: 555
@josueem14
@josueem14 3 жыл бұрын
As someone starting in the web development industry, all these technologies feel so overwhelming.
@lohar5055
@lohar5055 3 жыл бұрын
If you are just starting out than just stick to HTML, CSS, Javascript. And really these are the hardest of the web dev learning curve. When your little project starts to get bigger and somewhat complex, take on a framework like React, or Vue. Learning a framework and the techs that surround it are really easy. Because the the majority of your time is spent learning better approaches to a problem and becomming a better programmer. Again these techs and their names may sound overwhelming but are really easy to pick up.
@thuggfrogg
@thuggfrogg 3 жыл бұрын
The internet is a million hacks duct-taped together with js. I bet we could simplify it all if we just replaced js with Scheme-in-the-browser... 😏
@crashito_x
@crashito_x 3 жыл бұрын
Welcome to the game
@letthedevscook
@letthedevscook 3 жыл бұрын
But starting out and moving forward regardless is the best thing to do. Congratulations on that :)
@shellyyang1916
@shellyyang1916 2 жыл бұрын
totally echo you !
@AshesOfEther
@AshesOfEther 3 жыл бұрын
Fireship: *Uploads a video.* Someone in the comments: OMG I WAS JUST LOOKING FOR THIS!!!!
@bouzianeamine8815
@bouzianeamine8815 3 жыл бұрын
i swear
@iRIDS
@iRIDS 3 жыл бұрын
I just started using snowpack with svelte yesterday and I was looking for something like this, that compares the different options. The algorithm sees all.
@azatecas
@azatecas 3 жыл бұрын
but is true tho lol, I was just looking at WebPack
@gonefishing7
@gonefishing7 3 жыл бұрын
It's a time-honoured tradition!
@StrangeIndeed
@StrangeIndeed 3 жыл бұрын
Fireship has 460k subs, so things like that are bound to happen
@BigGingerJake
@BigGingerJake 3 жыл бұрын
I've been watching these tutorials for a while now, and I continue to be blown away by how much value you are able cram into each short video. The quality and conciseness that your style delivers is just brilliant, and imho fits perfectly in line with what your target audience desires. I'd just like you to know that you are doing a phenominal job, and I've decided to sign up for full membership. Thank you for your hard work and amazing content.
@naturesdip
@naturesdip 3 жыл бұрын
Configuring Webpack from scratch for enterprise scale projects has been one of my best skill investments. It honestly feels like 90% of previous struggles have been due to bad project configs. Thank you so much for this video!
@ArtonnX
@ArtonnX Жыл бұрын
@@Snerdy0867 Just use Vite, it's much simpler and faster. I'm using it in my company.
@mrgalaxy396
@mrgalaxy396 Жыл бұрын
​@@Snerdy0867 Honestly just read the bundler's docs. It might take you a few hours but it will give you an overview of everything you can use in it and how to use it.
@jvcmarc
@jvcmarc 3 жыл бұрын
this channel is my gateway into the world of webdev! always when I'm confused about a subject such as docker, webpack, or anything like that, a new video comes out that helps me get started
@gonefishing7
@gonefishing7 3 жыл бұрын
I'm so glad I have notifications on; I was just trying to figure out how to use webpack! How did you know, Jeff???
@Fireship
@Fireship 3 жыл бұрын
That's what I do :)
@FalseDev
@FalseDev 3 жыл бұрын
It's getting spookier for Halloween
@cryptonative
@cryptonative 3 жыл бұрын
Thing is 50% of time your dealing with a bundler webpack, babel or metro for RN
@aj.arunkumar
@aj.arunkumar 3 жыл бұрын
Jeff has firesense 😋
@VinitKhandelwal
@VinitKhandelwal 3 жыл бұрын
It's probability. 1 out of thousands of followers is ought to do the same when the video is uploaded.
@estelagartija4149
@estelagartija4149 3 жыл бұрын
It literally took me 6 hours to watch the video and follow the steps and breaking my pc and braking my head but it was worth it. Thanks for taking us by the hand.
@PenguinjitsuX
@PenguinjitsuX 3 жыл бұрын
This is hands down the best development channel on KZfaq. The videos are succinct, perfectly to the point, and extremely useful. I've probably watched over 50 videos so far and every single one has been useful!
@speckyferns6780
@speckyferns6780 2 жыл бұрын
Some of the best courses ever - specific topics, clear delivery, fast, everything just works! Thank you!
@adipradhan3506
@adipradhan3506 3 жыл бұрын
Today I wasted my time understanding webpack with all the 2 hours courses and you explained it in what 10 minutes. Awesome dude 😎
@amnaatarapper
@amnaatarapper 3 жыл бұрын
Every time I come across one of this guy's video I end up learning a new skill... thank you man keep the great work going
@vadityag
@vadityag 3 жыл бұрын
This video is perfect in delivery. It doesn't bore people who are familiar with part of the stuff and it is very useful for beginners.
@CodingWithLewis
@CodingWithLewis 3 жыл бұрын
Always releasing quality videos Fireship! I get excited everytime you are in my sub box.
@ionitaa
@ionitaa 3 жыл бұрын
Classic KZfaq tutorial... First 5 steps (that are obvious to everybody) explained in detail, the next 3 (slightly harder steps) glanced over and the following 100.000 hard steps are not even addressed. There is no shortcut around the grind. Read the docs and and put aside a few days for learning webpack. 6 months from now when they ship a new major release you'll do it i all over again and you'll love it!
@danimunf
@danimunf 3 жыл бұрын
I really love this, I'm new js environment, so I've been watching a lot of your videos and thanks God i learn a lot. Now I'm confident enough to build my own portfolio and start my journey on js
@zoaybk
@zoaybk 3 жыл бұрын
I never tried to learn how to configure webpack because it seemed daunting to me. But you make it look so effortless. So quickly.
@epremier20050
@epremier20050 3 жыл бұрын
I've never been so happy to see this video finally be made because I was spending months trying to figure out how the heck bundlers are integrated into a project and I'm so glad to see how it goes in depth.
@simulation3120
@simulation3120 2 жыл бұрын
I don't know how I would learn to code without this channel.
@smohammeds
@smohammeds 3 жыл бұрын
You're an underrated legend in the world of web development educators. 🔥🔥🔥
@mathiasdeweerdt1400
@mathiasdeweerdt1400 3 жыл бұрын
Love the video, 3 small issues with the video though. - You have to install sass aswell and not only the loaders * npm install --save-dev sass - You used the scss variable "$color" but u defined "$text". - Add publicPath to devServer so it should like this: devServer: { publicPath: '/dist', contentBase: path.join(__dirname, 'public'), port: 9000 },
@JackEatock
@JackEatock 2 жыл бұрын
Thank you!
@goldensonu15
@goldensonu15 2 жыл бұрын
Thank you.. :) I have written like, devServer : { publicPath: '/dist', contentBase : path.join(__dirname, 'public'), port : 9000 } still, I see this error >>> "Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options has an unknown property 'contentBase'. Coz of this dev-server is not serving the page.. Any tips please ???
@vjzb3
@vjzb3 2 жыл бұрын
@@goldensonu15 from looking closely at the error it gave you, it looks like the contentBase key is not named correctly. You might scratch your head at this, because you see everyone else using contentBase - so the next step is to google 1 of 2 things: either “webpack contentBase not working” or something along those lines to see if anyone else has gotten this error (which will show you other people indeed have ran into this error and have also shared the solution), or if you’re a little more comfortable with the idea of API’s you might think do go directly to the Webpack documentation for the devServer object so that you can see all of the fields it accepts. The first of those two showed me what new field name belongs there, and the second google search helped me confirm that it appears in Webpack 4 the field was called “contentBase”, but now in Webpack 5 they are calling that field “static” and contentBase is no longer a valid field name. So you must have webpack version 5.x installed and it’s just telling you the schema for devServer has changed and that contentBase is no longer a valid field name. For all the options for devServer you can just google something like “webpack devServer” and the top link should take you to the official docs at webpack.js.org In the beginning, everything can be overwhelming so even though your console gave you a pretty actionable and clear error message, it’s totally normal to feel like you don’t know what to do next. This is basic debugging skills, but it can take a while to build the experience and intuition that makes these steps very obvious to you. You’re doing great
@abhishekjangid6695
@abhishekjangid6695 2 жыл бұрын
You saved me on this issue
@benkiarie149
@benkiarie149 2 жыл бұрын
@@goldensonu15 what worked for me is changing the contentBase to static. I read on stack overflow that's what should be used
@NikhilKumar-im8ls
@NikhilKumar-im8ls 3 жыл бұрын
Thanks for explaining these hard to get around topics in such a concise and fun way. Your videos are very helpful for beginners
@lohar5055
@lohar5055 3 жыл бұрын
Webpack on default minifies code. Setting "mode" to "development" reduces bundling times significantly.
@timeowilliams4620
@timeowilliams4620 3 жыл бұрын
Amazing video! Really appreciate that you showed life before and after module bundlers!
@AnantaAkash.Podder
@AnantaAkash.Podder 11 күн бұрын
It is one of the Finest if Not the BEST Explanation for Web Bundlers... I learned about HTML & CSS many years ago, yet I didn't know about the Concept of Web Bundlers
@Peter-ur8nv
@Peter-ur8nv 3 жыл бұрын
You are one of the 4 YT channels i’ve subscribed to. Your content is perfect. 👌
@swoorp
@swoorp 3 жыл бұрын
You're a great person, I saw something named as WebPack, fortunately, I had your notifications on and theres no problem now... Loved the tutorial! Thanks Jeff :)❤
@raybagss
@raybagss 3 жыл бұрын
Man, Thanks a lot, your "over 10" minutes video clarified and highlighted more than a 2hour tutorial could. Tha k you
@scott2574
@scott2574 Жыл бұрын
Update (April 20, 2022): Snowpack is no longer actively maintained and is not recommended for new projects.
@spuish
@spuish 3 ай бұрын
Thank you SO MUCH. I have been banging my head against the wall trying to understand webpack. This made it so simple!
@london5679
@london5679 3 жыл бұрын
For the record, you can use script tags with es6 Import syntax by delcaring the type as a module. i.e.
@amaury_permer
@amaury_permer 2 жыл бұрын
thoght the same
@Dev-Siri
@Dev-Siri Жыл бұрын
This works but the browser is not able to resolve the import if you do like: import lodash from 'lodash'; this doesn't work since it doesn't know to look into the node_modules folder. So you have to manually locate the package like this: import lodash from './node_modules/lodash'; and if it uses commonjs, ie the require() function instead of `import` and `export` then well, it won't work either. The commonjs `require()` function is not defined in the browser
@bmfitzgerald3
@bmfitzgerald3 Жыл бұрын
@@Dev-Siri I also wonder, when importing manually, that even if you supply the path to the package './node_modules/lodash' ... I wonder if the browser would have trouble if lodash itself had its own dependencies which it needed to find. Perhaps a non-issue, but I haven't set up a test yet
@Dev-Siri
@Dev-Siri Жыл бұрын
​@@bmfitzgerald3 yea its possible. Since even if we supply the path to the browser, it would still be confused as it won't look outside the lodash folder and in the node_modules again. Source Code -----------------------|--------------------- IMPORT ./node_modules/lodash | Some Dependency
@Raidar29
@Raidar29 4 ай бұрын
@@Dev-Siri exactly, and it also won't work if the dependency has it's own module identifier. e.g './node_modules/chart.js/dist/chart.js' could work but inside of the chart.js file theres a strange import: import '@kurkle/color' It took me a while to figure all this out, now i'm here trying to understand bundlers so i can get chartjs to work
@EmJiMadhu
@EmJiMadhu 3 жыл бұрын
Dude, seriously. You are literally the best!!! You give insights about something in few minutes. Most of the time, most developers want is to learn something quickly! Yes it might sound like a joke. But its true. How many of you skipped video just to learn the important part!!!! We all did. And he (i am really soory. I forgot your name the guy who made this video. I am following you since you "were" part of firebase. I Still remeber those videos you made for firebase!!), just gives you the important stuff!! Trust me when you are a developer and you didnt have the time to go through the whole video, you skip. Thank you sooo much dude! And all his videos, its not just learning but fun and jokes!!! For example "Heaviest object in the universe"? Dude that was awesome!!!! I laughed the hell out!!!!!!!! It is fun learning with you. And i swear when i get my next job i will definitly donate you dude!!! Seriously i will. Because you desrve it!! Thanks and Peace!
@wontonfuton
@wontonfuton 3 жыл бұрын
🔥 content from fireship as always. Used webpack for several of my frontend learning projects. Learned quite a bit more here today as well.
@muhammadsami479
@muhammadsami479 3 жыл бұрын
Web assembly on the list?😍
@Fireship
@Fireship 3 жыл бұрын
WASM in 100 seconds coming soon...
@Brunoenribeiro
@Brunoenribeiro 3 жыл бұрын
@@Fireship good lord, hope it comes out in the next 100 seconds 😂 cant wait!!
@albertbennett6290
@albertbennett6290 3 жыл бұрын
@@Fireship Even though I know nothing about Javascript or web development in general, still very excited.
@bmejia220
@bmejia220 Жыл бұрын
Snowpack sounds awesome!! Can’t wait to try it. Thank you!
@nallidremylc
@nallidremylc Жыл бұрын
Love the content. I’ve always heard of webpack but now I’m starting to use it I needed the guidance. Thanks for the information
@anmoldewan527
@anmoldewan527 3 жыл бұрын
Having "eureka" moments throughout the video! Loving it ❤️
@TamDNB
@TamDNB 3 жыл бұрын
I forget these exist tbh, thanks for reminding me how lucky I am Jeff.
@vatsalpatel3669
@vatsalpatel3669 2 жыл бұрын
Really really really simple and best video I was thinking to take course for learning webpack but you just did it in 9 mins thanks bro you are awesome one of the best channel I have subscribed from my account😎🙏
@nickeax
@nickeax 3 жыл бұрын
Thanks for producing concise and relevant lessons!
@JC-jz6rx
@JC-jz6rx 2 жыл бұрын
i had been struggling with this for sooooooooo long Thank YOU
@RoyerAdames
@RoyerAdames 3 жыл бұрын
OMG I WAS JUST LOOKING FOR THIS!!!! Thank you. Great content.
@patmuller8992
@patmuller8992 2 жыл бұрын
Incredibly useful for getting started. Thank you!
@sauravkumarjha2838
@sauravkumarjha2838 Жыл бұрын
Helpful... For me, your content looks like perfection..
@pavithraraghav1256
@pavithraraghav1256 21 күн бұрын
Awesome explanation . Thanks for step by step from scratch
@dannygarcia8012
@dannygarcia8012 6 ай бұрын
Very helpful, thanks for taking the time to do this!
@codegully_channel
@codegully_channel Жыл бұрын
Very well summarized video on Webpack. Keep it up.!
@vuelancer
@vuelancer 3 жыл бұрын
writing this comment while waiting for the video and advertisement to finish. I always don't want to skip the ad in your video.
@darkwoodmovies
@darkwoodmovies 6 ай бұрын
It's sad, but I've been using these tools with never fully understanding them. Thank you for this.
@RianY2K
@RianY2K 3 жыл бұрын
More details and tutorials for Snowpack please ?
@artgreg2296
@artgreg2296 3 жыл бұрын
+1
@JimmyS2
@JimmyS2 3 жыл бұрын
This is one awesome video, this is my quick reference for using WebPack, thank you
@KevinVandyTech
@KevinVandyTech 3 жыл бұрын
I recently had to learn all this when building our own component library. We use Rollup and Babel, and it works, but we're probably still doing a lot of things wrong.
@Wakkyguy
@Wakkyguy 3 жыл бұрын
This is the first that I was able to comprehend module bundlers.
@pauldill8368
@pauldill8368 3 жыл бұрын
Webpack, demystified! Thank you. I found solutions to past problems in that video that had so far gone unsolved.
@ridl27
@ridl27 3 жыл бұрын
ok, now we are waiting for Snowpack tutorial :) and ty.
@okbrown
@okbrown 3 жыл бұрын
Definitely the best Bundler tutorial/guide for Webpack to date. I would go as far as to say better than the horrid docs they provide too. 🍺👋🏾
@stickzman
@stickzman 3 жыл бұрын
Your channel is a godsend.
@DalexHD
@DalexHD 3 жыл бұрын
Love your work!! ♥️
@pging8328
@pging8328 2 жыл бұрын
This video is simply superb, par excellence.
@vaniad555
@vaniad555 3 жыл бұрын
I wasn't sure what I was looking for asTS code didn't compile, but it found me :), the algorithm is getting fast.
@icecruiserr
@icecruiserr 3 жыл бұрын
Very informative and well made video - thank you!
@ivonnebenites3308
@ivonnebenites3308 11 ай бұрын
Thank you so much for the video , I totally appreciate it, It had helped me to understand bundlers like webpack, thanks!!!
@albertchung7641
@albertchung7641 3 жыл бұрын
Your videos are always so good!
@UltimateOstrichRider
@UltimateOstrichRider Жыл бұрын
Solid and concise tutorial. Thanks!
@codingblocks3495
@codingblocks3495 3 жыл бұрын
thanks dude your content is fresh and awesome as always
@jackmaison4209
@jackmaison4209 3 жыл бұрын
Finally, I understand webpack. Great introduction!
@Nexus-rt1bm
@Nexus-rt1bm 3 жыл бұрын
You think you do, you do not
@Dylan_thebrand_slayer_Mulveiny
@Dylan_thebrand_slayer_Mulveiny 3 жыл бұрын
Been a dev a long time. Back in "the day" we just wrote sites with jQuery, css and html. I cannot imagine going back to that. I
@kristijanross977
@kristijanross977 2 жыл бұрын
yeahhhhh
@lifeisbeautifu1
@lifeisbeautifu1 Жыл бұрын
Clean explanation. Thank you.
@maskman4821
@maskman4821 3 жыл бұрын
pretty awesome tutorial about webpack, now snowpack is out and performs much better than webpack, so it is time to expect a great snowpack tutorial coming out !!!
@MohdRusmanAriefARahman
@MohdRusmanAriefARahman 3 жыл бұрын
Thanks for the great content Mr Fireship.
@ChiCity511
@ChiCity511 2 жыл бұрын
The reason you get the error at 3:28 is actually because you haven't specified type="module" in your script tag. You still can't do bare imports even after that but thats a separate issue.
@davidezih3510
@davidezih3510 6 ай бұрын
Not true for NPM modules.... And for your own local JS module files, maybe sure.
@souravsinha5330
@souravsinha5330 3 жыл бұрын
Thanks a ton sir. Got a clear picture on webpacks
@fullStackInKannada
@fullStackInKannada 13 сағат бұрын
Very nicely explained, thank you :)
@sachindraragul1094
@sachindraragul1094 3 жыл бұрын
You killed it. Thanks man
@danielzaiser
@danielzaiser 3 жыл бұрын
Wow snowpack looks awesome, i hope it is easy to migrate from webpack for huge projects, will give it a try 😅
@palikircis5877
@palikircis5877 2 жыл бұрын
This is a very good one and I really appreciate it. By the way if someone had an error like this "PostCSS received undefined instead of CSS string". Try installing also as Dev Dependencies sass aside from sass-loader and you will be fine. Also contentBase for dev server is deprecated and thus change with the word static instead.
@mannymedina1132
@mannymedina1132 Жыл бұрын
My savior
@sonyuinthesky
@sonyuinthesky Жыл бұрын
Thank you, I was confused with this one.
@jameswinston5369
@jameswinston5369 Жыл бұрын
Lifesaver.
@ang3loux
@ang3loux 3 жыл бұрын
You guys are so awesome!
@abdelhamidkhalil6535
@abdelhamidkhalil6535 3 жыл бұрын
Thank you, this came at the right time 👌
@JordanAF808
@JordanAF808 3 жыл бұрын
0:01 The best explanation of modern web development in 60 seconds.
@LifeWithRilla
@LifeWithRilla 3 жыл бұрын
Great video tbh! I really appreciate it brother!
@zishanabuobaida3684
@zishanabuobaida3684 2 жыл бұрын
Thank you so much ! That was a great help!
@Torsten3000
@Torsten3000 Жыл бұрын
Great content, very valuable info.
@stegjgzades6019
@stegjgzades6019 3 жыл бұрын
If I had this video when I started spa apps... Thanks❤
@007jayy
@007jayy 3 жыл бұрын
Thanks man, this was very helpful.
@shasherazi
@shasherazi Жыл бұрын
This video is a lesson in a BootCamp I'm attending (microverse), but I have already watched this video many times lol
@heliotherapyy55
@heliotherapyy55 2 жыл бұрын
amazing video! thanks a lot.
@saifgaida5872
@saifgaida5872 Жыл бұрын
very helpful for starting
@vinayrwt
@vinayrwt 3 жыл бұрын
I've just used snowpack and that's awesome😍
@JohnJohnson-ds4ui
@JohnJohnson-ds4ui 3 жыл бұрын
Perfect timing 👌
@AbdulRaheemDumrai
@AbdulRaheemDumrai 2 ай бұрын
I appreciate your teaching style. It will be more convenient for us to understand if you could slow down the script. Thanks!
@Maxim86
@Maxim86 3 жыл бұрын
Now that's a solid 'Men at Work' reference.
@lukasluftlaufer1093
@lukasluftlaufer1093 3 жыл бұрын
Finally concepts click! Thanks a lot!
@jonwakefield813
@jonwakefield813 Жыл бұрын
Dude... thank GOD for this video
@glimpsee7941
@glimpsee7941 3 жыл бұрын
As usual, you lead us forward
@omegawolfe1
@omegawolfe1 3 жыл бұрын
U made me start learning programming..... i can't understand shit but it's okey .... if i keep trying one day I'll understand fully ur vids
@kevindandrade4016
@kevindandrade4016 Ай бұрын
I'm new to Bundlers and I gotta say your explanation and demos here were way easier to understand..Even ChatGPT sucked for this topic
@EnglishRain
@EnglishRain Жыл бұрын
Thanks a TON for ZOOMING IN
@Kasukke
@Kasukke 3 жыл бұрын
Wow finally an easy explanation. Can you do code splitting next?
@Sagarclips
@Sagarclips 2 жыл бұрын
Well explained 👏
@ReadieFur
@ReadieFur 2 жыл бұрын
1:52 gave me a good little chuckle
@augusto256
@augusto256 3 жыл бұрын
Best web dev channel.
Webpack crash course | easy way
32:07
Hitesh Choudhary
Рет қаралды 57 М.
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 30 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 68 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 46 МЛН
How to OVER Engineer a Website // What is a Tech Stack?
11:20
Fireship
Рет қаралды 2,4 МЛН
UI Libraries Are Dying, Here's Why
13:28
Theo - t3․gg
Рет қаралды 291 М.
How programmers flex on each other
6:20
Fireship
Рет қаралды 2,3 МЛН
Require vs Import Javascript
22:39
Monsterlessons Academy
Рет қаралды 77 М.
100+ Docker Concepts you Need to Know
8:28
Fireship
Рет қаралды 898 М.
10 regrets of experienced programmers
8:16
Fireship
Рет қаралды 1,2 МЛН
How One Line of Code Almost Blew Up the Internet
13:47
Kevin Fang
Рет қаралды 2 МЛН
The Story of Next.js
12:13
uidotdev
Рет қаралды 561 М.
~/.dotfiles in 100 Seconds
13:54
Fireship
Рет қаралды 413 М.