Тёмный

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

Fireship
Подписаться 3,1 млн
Просмотров 451 тыс.
50% 1

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

Наука

Опубликовано:

 

21 окт 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 545   
@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 2 года назад
But starting out and moving forward regardless is the best thing to do. Congratulations on that :)
@shellyyang1916
@shellyyang1916 2 года назад
totally echo you !
@TobiasSN
@TobiasSN 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
@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.
@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
@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.
@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.
@spuish
@spuish 29 дней назад
Thank you SO MUCH. I have been banging my head against the wall trying to understand webpack. This made it so simple!
@ionitaa
@ionitaa 3 года назад
Classic RU-vid 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!
@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
@PenguinjitsuX
@PenguinjitsuX 2 года назад
This is hands down the best development channel on RU-vid. 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!
@lohar5055
@lohar5055 3 года назад
Webpack on default minifies code. Setting "mode" to "development" reduces bundling times significantly.
@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.
@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 😎
@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.
@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
@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
@CodingWithLewis
@CodingWithLewis 3 года назад
Always releasing quality videos Fireship! I get excited everytime you are in my sub box.
@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.
@darkwoodmovies
@darkwoodmovies 3 месяца назад
It's sad, but I've been using these tools with never fully understanding them. Thank you for this.
@simulation3120
@simulation3120 2 года назад
I don't know how I would learn to code without this channel.
@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 10 месяцев назад
@@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 10 месяцев назад
​@@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 2 месяца назад
@@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
@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
@timeowilliams4620
@timeowilliams4620 2 года назад
Amazing video! Really appreciate that you showed life before and after module bundlers!
@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.
@smohammeds
@smohammeds 3 года назад
You're an underrated legend in the world of web development educators. 🔥🔥🔥
@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.
@raymondbags3970
@raymondbags3970 3 года назад
Man, Thanks a lot, your "over 10" minutes video clarified and highlighted more than a 2hour tutorial could. Tha k you
@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.
@ChiCity511
@ChiCity511 Год назад
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 4 месяца назад
Not true for NPM modules.... And for your own local JS module files, maybe sure.
@RianY2K
@RianY2K 3 года назад
More details and tutorials for Snowpack please ?
@artgreg2296
@artgreg2296 3 года назад
+1
@Peter-ur8nv
@Peter-ur8nv 3 года назад
You are one of the 4 YT channels i’ve subscribed to. Your content is perfect. 👌
@bmejia220
@bmejia220 Год назад
Snowpack sounds awesome!! Can’t wait to try it. Thank you!
@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 :)❤
@dannygarcia8012
@dannygarcia8012 3 месяца назад
Very helpful, thanks for taking the time to do this!
@anmoldewan527
@anmoldewan527 3 года назад
Having "eureka" moments throughout the video! Loving it ❤️
@nickeax
@nickeax 3 года назад
Thanks for producing concise and relevant lessons!
@nallidremylc
@nallidremylc 10 месяцев назад
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
@patmuller8992
@patmuller8992 2 года назад
Incredibly useful for getting started. Thank you!
@vatsalpatel3669
@vatsalpatel3669 Год назад
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😎🙏
@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!
@RoyerAdames
@RoyerAdames 3 года назад
OMG I WAS JUST LOOKING FOR THIS!!!! Thank you. Great content.
@Social-Hacking
@Social-Hacking Год назад
I was stuck for close to a week on this. Thank you! Looking forward to going back to coding now.
@JC-jz6rx
@JC-jz6rx 2 года назад
i had been struggling with this for sooooooooo long Thank YOU
@scott2574
@scott2574 Год назад
Update (April 20, 2022): Snowpack is no longer actively maintained and is not recommended for new projects.
@TamDNB
@TamDNB 3 года назад
I forget these exist tbh, thanks for reminding me how lucky I am Jeff.
@sauravkumarjha2838
@sauravkumarjha2838 Год назад
Helpful... For me, your content looks like perfection..
@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.
@pauldill8368
@pauldill8368 3 года назад
Webpack, demystified! Thank you. I found solutions to past problems in that video that had so far gone unsolved.
@JimmyS2
@JimmyS2 3 года назад
This is one awesome video, this is my quick reference for using WebPack, thank you
@thinkeneering
@thinkeneering Год назад
As of 2023, I was getting an error about missing sass at 7:01. If this happens to you, what you can do is update your style loaders by typing the following on the command line: npm install --save-dev style-loader css-loader sass sass-loader
@incrypted607
@incrypted607 Год назад
Thank you for saving me time trying to figure this out! :D
@PurpleyBlueDuck
@PurpleyBlueDuck 5 месяцев назад
Thank you!
@Wakkyguy
@Wakkyguy 3 года назад
This is the first that I was able to comprehend module bundlers.
@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.
@ridl27
@ridl27 3 года назад
ok, now we are waiting for Snowpack tutorial :) and ty.
@UltimateOstrichRider
@UltimateOstrichRider Год назад
Solid and concise tutorial. Thanks!
@DalexHD
@DalexHD 3 года назад
Love your work!! ♥️
@abdelhamidkhalil6535
@abdelhamidkhalil6535 3 года назад
Thank you, this came at the right time 👌
@icecruiserr
@icecruiserr 3 года назад
Very informative and well made video - thank you!
@codegully_channel
@codegully_channel Год назад
Very well summarized video on Webpack. Keep it up.!
@codingblocks3495
@codingblocks3495 3 года назад
thanks dude your content is fresh and awesome as always
@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
@albertchung7641
@albertchung7641 3 года назад
Your videos are always so good!
@Maxim86
@Maxim86 2 года назад
Now that's a solid 'Men at Work' reference.
@pging8328
@pging8328 2 года назад
This video is simply superb, par excellence.
@ivonnebenites3308
@ivonnebenites3308 9 месяцев назад
Thank you so much for the video , I totally appreciate it, It had helped me to understand bundlers like webpack, thanks!!!
@souravsinha5330
@souravsinha5330 3 года назад
Thanks a ton sir. Got a clear picture on webpacks
@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.
@MohdRusmanAriefARahman
@MohdRusmanAriefARahman 3 года назад
Thanks for the great content Mr Fireship.
@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.
@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. 🍺👋🏾
@jackmaison4209
@jackmaison4209 3 года назад
Finally, I understand webpack. Great introduction!
@Nexus-rt1bm
@Nexus-rt1bm 3 года назад
You think you do, you do not
@jerrynwosu
@jerrynwosu 3 года назад
Thanks man, this was very helpful.
@Torsten3000
@Torsten3000 Год назад
Great content, very valuable info.
@zishanabuobaida3684
@zishanabuobaida3684 2 года назад
Thank you so much ! That was a great help!
@LifeWithRilla
@LifeWithRilla 3 года назад
Great video tbh! I really appreciate it brother!
@vinayrwt
@vinayrwt 3 года назад
I've just used snowpack and that's awesome😍
@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 !!!
@stegjgzades6019
@stegjgzades6019 3 года назад
If I had this video when I started spa apps... Thanks❤
@feelwang
@feelwang 3 года назад
For anyone really care to follow: 1 install sass 2 change $text to $color in sass. 3 After dev server, change to src=“main.js” because wdv does not output anything. Still, great work.
@thomaslukasiewicz7026
@thomaslukasiewicz7026 Год назад
im doing an intro talk on this and using this tutorial as a guide... you have absolutely saved my life
@BrUSomania
@BrUSomania Год назад
Thank you! :)
@JordanAF808
@JordanAF808 3 года назад
0:01 The best explanation of modern web development in 60 seconds.
@stickzman
@stickzman 3 года назад
Your channel is a godsend.
@JohnJohnson-ds4ui
@JohnJohnson-ds4ui 3 года назад
Perfect timing 👌
@danielzaiser
@danielzaiser 3 года назад
Wow snowpack looks awesome, i hope it is easy to migrate from webpack for huge projects, will give it a try 😅
@lifeisbeautifu1
@lifeisbeautifu1 Год назад
Clean explanation. Thank you.
@sachindraragul1094
@sachindraragul1094 2 года назад
You killed it. Thanks man
@ReadieFur
@ReadieFur 2 года назад
1:52 gave me a good little chuckle
@lukasluftlaufer1093
@lukasluftlaufer1093 3 года назад
Finally concepts click! Thanks a lot!
@shasherazi
@shasherazi Год назад
This video is a lesson in a BootCamp I'm attending (microverse), but I have already watched this video many times lol
@SnailDOS
@SnailDOS 2 года назад
"No one just uses html, css and javascript to build a website" Me: "haha yes"
@glimpsee7941
@glimpsee7941 3 года назад
As usual, you lead us forward
@jonwakefield813
@jonwakefield813 Год назад
Dude... thank GOD for this video
@cpaez2000
@cpaez2000 Год назад
3:23 this error "cannot use an import outside a module" is because you need to write "type="module"" inside script tag and you need a node server like "live server" to use modules. Anyway the error that you will have is "failed to resolve module specifier "lodash". Relative references must start with either "/", "./", or "../".
@ang3loux
@ang3loux 2 года назад
You guys are so awesome!
@nastygambler2522
@nastygambler2522 3 года назад
Love❤️ snowpack and happy😁 that svelte💥 has inclination 🎚️ towards snowpack... ❄️
@Fireship
@Fireship 3 года назад
I think says a lot about their commitment to a good dev experience
@iRIDS
@iRIDS 3 года назад
yeah I just tried out snowpacks create snowpack app svelte template yesterday. I'm liking it better than the standard rollup template.
@nastygambler2522
@nastygambler2522 3 года назад
Svelte team is working as much as they can for good developer experience ... They added typescript support too.....
@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
@heliotherapyy55
@heliotherapyy55 2 года назад
amazing video! thanks a lot.
@tvo7781
@tvo7781 3 года назад
Excellent. Thank you.
@Kasukke
@Kasukke 3 года назад
Wow finally an easy explanation. Can you do code splitting next?
@eighties8
@eighties8 10 месяцев назад
For anyone getting errors after 8:10, use this instead: devServer: { static: { directory: path.join(__dirname, 'public'), }, compress: true, port: 9000, },
@PurpleyBlueDuck
@PurpleyBlueDuck 5 месяцев назад
Thank you.
@augusto256
@augusto256 3 года назад
Best web dev channel.
Далее
ГЕНИИ МАРКЕТИНГА 😂
00:35
Просмотров 1,8 млн
WOW... WHAT A FIGHT!!!!! 📣 #ufc302
00:48
Просмотров 852 тыс.
10 Design Patterns Explained in 10 Minutes
11:04
Просмотров 2,1 млн
Require vs Import Javascript
22:39
Просмотров 75 тыс.
100+ Docker Concepts you Need to Know
8:28
Просмотров 775 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 365 тыс.
Explains Module Bundlers in 3 Levels of Difficulty
18:35
Why is Everyone Using Vite?
7:34
Просмотров 72 тыс.
Vite Crash Course | Faster Alternative To CRA
16:24
Просмотров 183 тыс.
I tried 10 code editors
10:28
Просмотров 2,8 млн
TypeScript - The Basics
12:01
Просмотров 1,5 млн
Куда пропал 3D Touch? #apple #iphone
0:51
Просмотров 823 тыс.
Индуктивность и дроссель.
1:00
ПК с Авито за 3000р
0:58
Просмотров 1,6 млн
Power up all cell phones.
0:17
Просмотров 49 млн