Learn Webpack - Full Tutorial for Beginners

Sdílet
Vložit
  • čas přidán 17. 05. 2024
  • Learn Webpack from Colt Steele in this full tutorial course. It begins with a simple question: "What is webpack?" Quickly we move on to installing Webpack, configuring it, and adding loaders for CSS, SASS, HTML, and Files. The course covers cache busting, setting up a dev server, and splitting up your development and production config files. We incorporate multiple Webpack plugins including clean-webpack-plugin, mini-css-extract-plugin, optimize-css-assets-webpack-plugin, terser-webpack-plugin, and html-webpack-plugin. It's a lot of stuff :)
    💻 Code and commits: github.com/Colt/webpack-demo-app
    🔗 Colt Steele's CZcams channel: / @coltsteelecode
    🔗 Colt Steele's Udemy courses: www.udemy.com/user/coltsteele/
    ⭐️ Course Contents ⭐️
    ⌨️ (0:00:00) What Even Is Webpack??
    ⌨️ (0:08:12) Installing and Running Webpack and Webpack-CLI
    ⌨️ (0:22:18) Imports, Exports, & Webpack Modules
    ⌨️ (0:29:58) Configuring Webpack
    ⌨️ (0:38:57) Loaders, CSS, & SASS
    ⌨️ (0:53:55) Cache Busting and Plugins
    ⌨️ (1:07:13) Splitting Dev & Production
    ⌨️ (1:17:13) Html-loader, File-loader, & Clean-webpack
    ⌨️ (1:28:17) Multiple Entrypoints & Vendor.js
    ⌨️ (1:34:45) Extract CSS & Minify HTML/CSS/JS
    --
    Learn to code for free and get a developer job: www.freecodecamp.org
    Read hundreds of articles on programming: www.freecodecamp.org/news

Komentáře • 560

  • @Elluzive
    @Elluzive Před 4 lety +354

    Colt is responsible for me going down this web development rabbit hole. I have not seen daylight in a year.

    • @dailydevelopershow
      @dailydevelopershow Před 4 lety +2

      @@neilt1352 Hahaha

    • @igorsushko1356
      @igorsushko1356 Před 4 lety +5

      "You can learn this 6 topics and work like frontend developer" - spoke they, haha

    • @rethabilencheke2338
      @rethabilencheke2338 Před 4 lety

      @@neilt1352 Hahahaha

    • @lycan2494
      @lycan2494 Před 4 lety +2

      no you are responsible for what you have done for yourself. not colt. not anybody else.

    • @zarrar1825
      @zarrar1825 Před 3 lety +8

      Innocent its a joke jeez who hurt you?

  • @pouyajabbarisani
    @pouyajabbarisani Před 3 lety +210

    It's about 4 years since I'm using webpack but today I've actually learned it!

  • @asoluka_tee
    @asoluka_tee Před 4 měsíci +4

    The best video on webpack I have seen so far.
    When following this video (in 2023), at the point where we use file-loader, you might experience a bug that causes your webpack to build two asset files and then link to the wrong one.
    This is due to webpack 5 adding functionality to load assets by default.
    To resolve that error, add this to the rules array,
    {
    test: /\.(svg|png|jpe?g|gif)$/i,
    type: "asset/resource",
    },
    and remove the file-loader config completely.

  • @LyadhKhorEngineer
    @LyadhKhorEngineer Před 4 lety +12

    Colt is the reason why I was able to get back into Coding. Thanks for being an awesome instructor in Udemy and everywhere.

  • @zionsandeep788
    @zionsandeep788 Před 2 lety +58

    Just halfway through the video and I've already understood more than what I got from a paid Udemy course. Though this video is 2 years old, its a fantastic starting point for anyone willing to learn Webpack!
    Colt, you're an absolute legend. Thanks!

  • @CalmedByNature
    @CalmedByNature Před 4 lety +5

    Spent the whole day searching for a tutorial this good. Thank you.

  • @AshishKumar-UI
    @AshishKumar-UI Před 4 lety +1

    This is one of those amazing tutorials I have watched so far in my entire career. Thank you so much for this detailed explanation. you are awesome...!!

  • @chiragparyani7546
    @chiragparyani7546 Před rokem +1

    Best 2 hours spent on a video tutorial in months! Loved it. Thanks Colt!

  • @psychoedge
    @psychoedge Před 3 lety +2

    Handy down one of the best tutorials I've seen on web technologies. Thanks for making me able to set up a webpack project in a glimpse

  • @benjaminmoseslieb9856
    @benjaminmoseslieb9856 Před 2 lety

    One of the best tutorials I've ever watched. And I've watched 15 years worth of tutorials. Thank you so much, subscribing.

  • @kevinwagner5023
    @kevinwagner5023 Před 3 lety

    this is such an excellent introduction to the basics and theory of webpack, enough to get a person up and running with their own project or able to competently interact with a current webpack configuration. It's just under 2 hours of video time, however I spent probably a told of 5 hours setting things ups, coding along, etc. Very well worth it

  • @joelfernando9905
    @joelfernando9905 Před 3 lety +1

    Thanks, thanks and thanks! Literally 2 weeks trying to learn Webpack and just with this course in one day i feel pretty confident to start my own projects and sticking with the docs to do awesome things with module bundling. As always Colt never fails :D

  • @Same7ashY
    @Same7ashY Před 2 lety +1

    Always on point, Colt!
    In my opinion, this is the only tutorial one would need to understand how webpack works.
    Thank you for such a great tutorial.

  • @mehra.akshit
    @mehra.akshit Před 4 lety

    Struggling to grasp the basic concepts of Webpack, I found this video! Best of the best step-by-step explanation. Thank you!

  • @dankokozar
    @dankokozar Před 2 lety +1

    Best Webpack tutorial online. Right order of features and the right pace. Kudos!

  • @mehulgala07
    @mehulgala07 Před 3 lety +10

    This guy is amazing! Thoroughly enjoyed the mini-course. I must confess I was always a bit intimidated by Webpack but this guy has taken away my mental demons. The content and structure of this course is amazing! Loved it! Thanks, Colt, you are amazing !!!

  • @VikasTawniya
    @VikasTawniya Před 3 lety

    Colt is one of the best tutor out there. I love his courses.

  • @matthewstaton6810
    @matthewstaton6810 Před 4 lety +7

    Love this man. Introduced me to this industry. Appreciate it, Colt.

  • @lilrex2015
    @lilrex2015 Před 4 lety +7

    Wow, this 2 hr video took me 5 days to get through, but I enjoyed every second of it and this helped me soooooo much.

  • @martinpenev6750
    @martinpenev6750 Před 3 lety

    So far this is one of the best and most comprehensive tutorial and explanation of Webpack. I learned so much here.

  • @YinonOved
    @YinonOved Před 4 lety

    Glad I found this course by colt Steele. Couple of years back I went through his js algorithms and data structures course and it was so clear and fun to learn

  • @dangolekhayotango1656
    @dangolekhayotango1656 Před 4 lety +33

    Love u colt Steele..Ur web developer bootcamp in udemy is awesome. love from Nepal

  • @ORNSTAIOAO
    @ORNSTAIOAO Před rokem +3

    I'm a webpack newbie and this video was a HUGE help! I can't thank you enough!

  • @AlexanderDemin
    @AlexanderDemin Před 3 lety

    Once again, just finished the course in the "coding along" mode. The fantastic course! Recommended.

  • @sashengovender2401
    @sashengovender2401 Před 4 lety +7

    This tutorial helped me more than you can imagine. Thank you very much sir!

  • @anmolrastogi380
    @anmolrastogi380 Před 4 lety

    This is perhaps the best webpack tutorial i have watched. Thank you Colt

  • @roydonk2878
    @roydonk2878 Před 4 lety

    Thank you for taking such an intimidating concept and breaking it down step by step in an easy to digest and follow along away. And thank you even more for then providing that content for free.

  • @ricardodasilva9241
    @ricardodasilva9241 Před 3 lety

    This is the best webpack tut I have seem so far. I hardly find a article/video with the proper project source and commits. Hope to see more stuff like this with babel for example.

  • @tylercode2207
    @tylercode2207 Před 2 lety

    You are really a good teacher...This is one of the best tutorials out there in general...Keep up the good work brother!

  • @MrFunasty
    @MrFunasty Před 4 lety

    This is the most comprehensive and helpful webpack turorial on youtube !

  • @bssushmitha6534
    @bssushmitha6534 Před 3 lety +1

    Very well explained Colt. Thank you for this tutorial. I highly recommend anyone who wants to learn a webpack, or start understanding it.

  • @kestonneunie
    @kestonneunie Před 2 lety

    Great course, and like many people have commented, you have really helped to demystify the webpack setup in such a simple way and also show us useful things we can do with it - top guy!

  • @prafullaraichurkar4369

    The content and the structure of this course is Amazing!
    Thank you Colt :)

  • @tmchecki8610
    @tmchecki8610 Před 3 lety +2

    the best webpack for me! I watched around 10 other tutorials and this one is the best.

  • @luancardosolc
    @luancardosolc Před 4 lety +1

    Really nice!! He explains how everything works instead of just do the things, it give us a better understanding.... tks a lot!!!

  • @balanceiseverything2565

    Love this tutorial. Demystified a lot about Webpack. Thank you Colt Steele.

  • @senthilkumaripaulsami5737

    Thank you for such a clear explanation. I learned a lot of stuff about webpack. I had to actually set up a new app with custom configurations. It was very daunting and intimidating. Then I found this video. This helped a lot in setting things up.

  • @yunusde
    @yunusde Před 4 lety +59

    Webpack always intimidates me, but now i am like "I know Kung-Fu". thank you so much.

  • @noraneco6762
    @noraneco6762 Před 6 měsíci +1

    This helped me so much while I was having trouble making sense of the webpack official documentation and couldn't figure out where to start. Thanks so much!

  • @vcizek6047
    @vcizek6047 Před 4 lety +1

    What a fantastic tutorial and an amazing tutor. This is great quality tutorial, thank you!

  • @kylehenson2259
    @kylehenson2259 Před 3 lety

    actually one of the best webpack tutorial , i appreciate it

  • @TazExprez
    @TazExprez Před 3 lety +76

    Great tutorial! Thank you so much!
    Needed to use
    const {merge} = require("webpack-merge");
    instead of
    const merge = require("webpack-merge");
    Just a heads up in case you get any errors.
    Webpack now minifies your production code by default. I still watched until the end of the tutorial to learn more.

    • @jordanski5421
      @jordanski5421 Před 3 lety

      Thanks that fixed my issue, where did you get that info? I'm interested in finding out exactly why this change occurred.

    • @ahmetozturk5178
      @ahmetozturk5178 Před 3 lety

      @@jordanski5421 check the official docs

    • @jordanmowry9164
      @jordanmowry9164 Před 3 lety

      Thanks. I was stuck for a while and couldn't figure out how to move forward.

  • @red_cape.
    @red_cape. Před 3 lety

    Man your content is amazing, you are a spetacular teacher, this subject seems like japanese to me and now it is so mutch simpler to understanding it. Thank you!

  • @justinturner2271
    @justinturner2271 Před 4 lety

    Great video for mid-software dev who has to start using webpack. Subscribed and will watch any other full/crash courses you publish.

  • @davidrodriguezramirez1941

    Not only I learned a lot, really a lot with this tutorial, but also I laughed a lot too, man, you're amazing and you gain a new follower

  • @alishokrollahi3310
    @alishokrollahi3310 Před 4 lety

    Amazing course! It was great like the previous tutorials. Thank you colt. You are the best

  • @GuilhermeCarvalhoOnline

    Amazing tutorial! Webpack was a kind of abstract tool for me, because I usually use CLI's. But not anymore, because I've seen here Webpack so easy to code. Thanks, man. Well done! :)

  • @DarrenLewisHarris
    @DarrenLewisHarris Před 4 lety +3

    Best tutorial I've encountered on this subject. Been following along while building an AngularJS app and it's been perfectly clear. Thank you!

  • @ayushsaini9798
    @ayushsaini9798 Před 2 lety +5

    This is still relevant in 2021. Thank you Colt!!!
    For people watching this, there are few things you might want to know:
    - with webpack 5, you can use asset modules instead of file-loader
    - use output.clean instead of clean-webpack-plugin

    • @andrsgarc
      @andrsgarc Před 2 lety +1

      thanks I was looking for this comment :D

  • @JoaquinAlcerro
    @JoaquinAlcerro Před 4 lety

    For me, this has been a great introduction tutorial. Thanks for your time and effort.

  • @anand_dudi
    @anand_dudi Před rokem

    wow what a instructor .define every thing in depth details

  • @georgeputnam4850
    @georgeputnam4850 Před 4 lety

    Just what I needed. Awesome introduction to Webpack!

  • @CodeGoblin
    @CodeGoblin Před 3 lety +46

    0:36:10 had to use "devtool": false, instead of none due to a breaking change in the latest webpack.
    1:15:04 latest webpack 5 package.json script: "start": "webpack serve --config webpack.dev.js --open",
    1:24:30 file-loader not needed in webpack 5: Add the following to your webpack.prod.js file
    module.exports = merge(common, {
    mode: "production",
    output: {
    filename: "main.[hash].js",
    path: path.resolve(__dirname, "dist"),
    assetModuleFilename: "./imgs/[name].[hash].[ext]",
    },
    });
    1:42:05 optimize-css-assets-webpack-plugin not supporting webpack5, use css-minimizer-webpack-plugin instead per maintainers.

    • @vijaynavale1079
      @vijaynavale1079 Před 2 lety +1

      thanks buddy

    • @Andre-px6hu
      @Andre-px6hu Před 2 lety +1

      thanks a lot man, I didn't understand why my images weren't loaded ahaha

    • @abdallahabdedaiem51
      @abdallahabdedaiem51 Před 2 lety +1

      I've just fixed devtool, and was curious if anyone had same issue, then I've ssen this. You Rock!

    • @jasonhoi85
      @jasonhoi85 Před 2 lety

      I will use devtool: 'inline-source-map' to make it look similar in webpack 5 (yes I know your tutorial at the time is at webpack 3)

    • @pranavc747
      @pranavc747 Před měsícem

      1:11:53 merge is being imported as a named function {merge} now instead of default const merge = ...

  • @vasshe
    @vasshe Před 4 lety

    Excellent video! thanks for taking the time to explain things clearly with great examples!

  • @bhaaratsharma6023
    @bhaaratsharma6023 Před rokem

    This guy is one of the best tutors out there.

  • @farhan_jiwani
    @farhan_jiwani Před 4 lety

    Very good tutorial and it covered a LOT but it was easy to ingest at the pace you took. I have already shared it with a few people who may benefit from this.

  • @sachindev0072002
    @sachindev0072002 Před 4 lety +2

    This video is a very good starter for every aspiring web developer. Extremely helpful for me personally. It's a one pill solution to learn Webpack in 2 hours. Great work Colt!!

    • @fer86bd
      @fer86bd Před 4 lety +1

      Sorry to bother you, but if this is a good starter point what would be the next step for learning it moe deeply? please, its so dificult to find something more advance!!

  • @pulserudeus7968
    @pulserudeus7968 Před rokem

    Very satisfying and informative! This is all what I wanna know. Thanks Colt!🙌🏼

  • @glennsep
    @glennsep Před 3 lety

    Great introduction. I learned a lot and believe I have a foot hold into getting a start with Webpack. Your cat is awesome!

  • @mohantalachutla6834
    @mohantalachutla6834 Před 4 lety

    What a tutorial!!! Simply awesome👏✊👍 one of the best i ve ever encountered. please do more

  • @nikhilhukkerikar6753
    @nikhilhukkerikar6753 Před 3 lety

    The video description should actually say "Explaining the Abstract framework Webpack"
    Seriously this is one of the best tutorials on Webpack I've come across that explain the concepts and architecture! Thank you!

  • @saddamhossain6270
    @saddamhossain6270 Před 3 lety

    Great tutorial. he has explained everything properly where everyone can understand.

  • @navead30
    @navead30 Před 3 lety

    One of the better introduction to webpack. Suddenly the webpack blackbox is more clear.

  • @TS-qf2km
    @TS-qf2km Před 4 lety

    Great piece of knowledge. Just starting my webpack journey and it clears a lot to me. Many thanks :)

  • @pixycz
    @pixycz Před 2 lety

    Excellent tutorial! Finally, I have the idea about Webpack now, I'm starting understand all the copy-paste black magic I've bee doing for years. Thank you!

  • @WarriorOfPiece
    @WarriorOfPiece Před 4 lety

    I really appreciate all the videos you guys upload

  • @lightningresaba146
    @lightningresaba146 Před 4 lety

    I'm new to web dev and i like what webpack can do, the tricky part is configuring it,
    but i like it so this is gonna be my workflow now, i might add some templating engine like handle bars too, currently I'm taking your algo data structures master class,
    tnx Colt!

  • @JoseNario
    @JoseNario Před 3 lety +7

    Easily the best webpack introduction I've seen, hands down.

  • @jwolfe890
    @jwolfe890 Před 3 lety

    easily the best webpack course on the web. thank you.

  • @LS-jv4uh
    @LS-jv4uh Před rokem

    Great overview! Really helped me wrap my head around everything. Thank you!

  • @mttrchrds
    @mttrchrds Před 4 lety +2

    Hey Colt, thanks for the tutorial. Really great and super useful.
    One bit of feedback: right at the end when you are minifying the HTML. You move "new HtmlWebpackPlugin()" from "plugins" in the common webpack config, and add it to "plugins" in the dev config - but in production you add it to "optimization.minimizer" instead of "plugins" which I found strange. It all seems to work great but an explanation why in production it is located in a different location would be really useful.
    Cheers, Matt.

  • @distantstorm88
    @distantstorm88 Před 2 lety

    This really helped me! Thanks for taking the time to do this video tutorial!
    On thing I would have loved to have seen is using multiple loaders for the same file type, however I am guessing you just have to tweak your regular expression.

  • @szymonadamczuk5367
    @szymonadamczuk5367 Před 3 lety

    Scary topic explained in a very simply and calmly. Love the tone of your voice @ColtSteele

  • @thecodecatalyst
    @thecodecatalyst Před 4 lety

    Thanks Colt Steele, You just cleared a black blur in my career, thanks a lot this is of great help!

  • @aadisriram
    @aadisriram Před 3 lety +1

    I decided to switch my career over and my first task on my new role was to upgrade Webpack! I looked at the docs for 2 days, read the existing codebase for a few more days and ended up with nothing. Saw this video and literally everything that I read over the last few days makes sense!

  • @berenjor
    @berenjor Před 3 lety

    This is such a useful video. Detailed explanations of what does what and why.

  • @Canardeur
    @Canardeur Před 4 lety

    Awesome tutorial. Extremely well explained. Thank you very much.

  • @maiaklimenko6614
    @maiaklimenko6614 Před 2 lety

    This is the best thing I cam across as a new developer. Webpack is indeed intimidating for the newbies, but I think I am pro at it after this video (not really, but we are definitely getting there!) ;)
    Thank you so much!

  • @malekak44
    @malekak44 Před 2 lety

    It helped me a lot. I was looking for this video. Good job dude.

  • @seephor
    @seephor Před 2 lety

    Great tutorial. Webpack is one of those development tools that becomes a development project on its own.

  • @Lammot
    @Lammot Před 4 lety +5

    Thanks dude, that's helpful.
    Minor suggestion: i know you like windows as background, but the bright light is... bright? :)
    Question: say i bloat my project with tons of files. Is there a way to graph dependencies? Maybe a gui?
    Question: does anybody know how /bin/ in some of npm modules come to be? Are they created on npm install? Or at a later date? Are the contents used for the module itself or does your app uses them? Do i need to clear them out if i want to do a clean build (assuming i used "npm update" beforehand).
    PS: Rusty is now a cat?

  • @juang_
    @juang_ Před 3 lety

    I've been using webpack for a couple of days without actually knowing what was going on until I found your tutorial. Thank you good sir!
    As a side note a couple of things do not work with latest version of webpack but just google the problem and fix it.

  • @birwinz
    @birwinz Před rokem

    Best Webpack tutorial I have viewed

  • @kerryd2060
    @kerryd2060 Před 4 lety +2

    I'm in all of your Udemy courses. Thank you.

  • @jayliang5737
    @jayliang5737 Před 4 lety

    Awesome! Best webpack video I've seen so far!

  • @srinivasb3845
    @srinivasb3845 Před 3 lety +1

    Highly recommend this video to get started with webpack.

  • @abhishes
    @abhishes Před 4 lety +3

    Amazing course. Will you be doing an advanced course as well? thank you so much for doing this.

  • @harshitnigam8700
    @harshitnigam8700 Před 4 lety

    Great stuff!! That was really helpful. Thumbs up for Colt Steele.

  • @Anf3lKun
    @Anf3lKun Před 3 lety

    Wow I took 4 days to go through this tutorial and at first I tried to solve the things by myself and then I watched How He did it and at the end of the course I felt like I learnt something really powerfull and uselul , so I just want to say Thank You, by far the best explanation I have ever seen on webpack.

  • @Ipod19953
    @Ipod19953 Před 3 lety

    The best webpack course I have ever seen

  • @bmiguelmf
    @bmiguelmf Před 3 lety

    Prime content!!! Great explanations, and proper examples. 5 Stars

  • @onlyjan9327
    @onlyjan9327 Před 2 lety

    I am in the last year of my school to be an electronic engineer while studying web development on my own. I've always had trouble with bad teachers and administrative management because usually, I feel I'm losing time and that the people that suppose to be our mentors don't care about us.
    Around minute 40:00 I genuinely started crying, I couldn't stop it, thinking why I don't have such an amazing teacher at school.
    I'm still crying, so I only can say THANK YOU!!!

  • @kirankandula2779
    @kirankandula2779 Před 3 lety

    Thanks for the tutorial. All important and basics are well covered.

  • @md.tahmidmozaffar9135
    @md.tahmidmozaffar9135 Před 3 lety

    Wow...!!! Very well explained tutorial. Learned a lot and enjoyed every bit of it. Thank you very much.

  • @onedimensionalchess4373

    Awesome course. I might have to review it, but I can see why ppl like Colt Steele.

  • @delectable11
    @delectable11 Před 2 lety

    You are so knowledgeable on this subject. Thank you very much.

  • @igorsushko1356
    @igorsushko1356 Před 4 lety

    Amazing clear tutorial! thank you very much!

  • @gabrielfono844
    @gabrielfono844 Před 4 lety

    damn
    this is awesome.
    hopefully, I will break down my interview at facebook , uber and capital one
    thanks colt.
    I read the doc and I thought I knew everthing but the way that you have explained it make me think that there are people really talent out there and I should follow them.
    this is the first course I took to you because I always think I am smart enough to figure everything out on my own.
    I really appreciate your efforts.

    • @bodhisatwabarma1156
      @bodhisatwabarma1156 Před 3 lety

      Where do you apply for these interviews ? Help out a bro from the 3rd world 😬

  • @freddo1230
    @freddo1230 Před 3 lety +1

    This was incredibly helpful, thank you very very much!!

  • @stefsmet
    @stefsmet Před 3 lety

    Wow! Thank you so much for this tutorial! By far the best explanation out there! Any tips for how to add babel and typescript?