Learn Webpack Pt. 10: Extract CSS & Minify HTML/CSS/JS

Поділитися
Вставка

КОМЕНТАРІ • 235

  • @edmundchan6601
    @edmundchan6601 5 років тому +55

    For those who are using v7.3.0 or newer, sass-loader automatically compresses the output if the mode is in 'production'.
    In the video, Colt was using an older version (7.1.0) hence the output wasn't minified (6:24) and that's why he installed the Optimize CSS Assets Webpack plugin. Hope this helps those who, like me at first, are confused why the need to install another plugin for minification when the output is already minified.

    • @pyoppyo
      @pyoppyo 4 роки тому +1

      I was wondering the same thing. Thank you for your comment!

    • @lookintomyeyes2681
      @lookintomyeyes2681 4 роки тому

      so we still have to use the loader for with css-loader for .css files ri8?

    • @carlosalbertobatistacruz
      @carlosalbertobatistacruz 3 роки тому

      very good explanation!

    • @rhul0017
      @rhul0017 3 роки тому +2

      just incase for anyone using webpack -v>5 use `css-minimizer-webpack-plugin` instead of Optimize CSS Assets Webpack plugin

  • @siegblink182
    @siegblink182 5 років тому +27

    At last, I've finished this tutorial series. But I will watch this again. There's just a lot of things to consume throughout the whole series.

  • @Stealth4g63
    @Stealth4g63 5 років тому +31

    You just know this is all good content. I’ll be back for this later.

  • @revillsimon
    @revillsimon 4 роки тому +2

    This was easily one of the most valuable and informative tutorial series I've watched this year. As a previous student of your Udemy Web Development Bootcamp a number of years ago, which lead to me changing careers and getting my first development job, I naturally expected a good series. But this was far better than I expected! I appreciate all the time you have taken to make this, as I know from experience that creating content is a lot of work behind the scenes. Thanks again, Colt!

  • @RonPasillas
    @RonPasillas 5 років тому

    I normally don't comment on UA-cam, but I gotta say, this was a solid course. I went from viewing Webpack as a black box to not being afraid of it.

  • @marekostrowski4378
    @marekostrowski4378 5 років тому

    The best free Webpack beginner course on UA-cam currently in my opinion. Thanks for this content, waiting for more!

  • @Ohhimark100
    @Ohhimark100 4 роки тому

    I'm new to webpack. Experienced 5 years IT professional but never got to touch this part of the codebase. This video series was really helpful. Thanks a lot.

  • @siddheshmore231
    @siddheshmore231 5 років тому

    Finally a tutorial that sheds some light on Webpack 4 while the rest of the internet is still discussing why the plugins they were used to in Webpack 3 are failing. Thanks dude.

  • @abe10
    @abe10 4 роки тому

    Wow man, that was the best 2 hours I've ever spent on UA-cam. Thanks for this series!!

  • @Даря-ь4и
    @Даря-ь4и 5 років тому

    This course is the best I've ever seen about webpack. It really makes all basic concepts clear and structured. I wish I could give it hundreds of likes. Thank you and looking forward to your new courses!

  • @jayeshukalkar
    @jayeshukalkar 5 років тому +1

    I wish i could comment on all 10 videos at a time. Its the perfect precised Knowledge about Webpack. Hatsoff to your efforts. I've downloaded all 10 videos for future reference.

  • @tonksonk951
    @tonksonk951 4 роки тому +1

    This tutorial series was amazing, really sealed the deal for me understanding webpack!
    I'm glad there's great people like you on UA-cam who take the time to make detailed tutorials like these, keep up the great work, and of course I subscribed because of this series 👏

  • @kandebabou
    @kandebabou 2 роки тому +1

    hi, just sharing an observation. It seems that if you are using webpack 5 in production mode, your css gets automatically modified by webpack. While following the course i noticed that my css was already bundled even without install the css minifier like colt. Then chatGTP confirmed it for me:
    In addition to that, webpack 5 has introduced a new feature called "production mode" which automatically enables the built-in optimization plugins, including the Terser webpack plugin for JS minification and the OptimizeCssAssetsWebpackPlugin for CSS minification.
    So, you can use the production mode instead of installing the css-minimizer-webpack-plugin if you want to minimize your CSS.

  • @omostan
    @omostan 5 років тому +1

    First, I want to thank you for this amazing tutorial series and also for freely sharing it. Second, I just want to say that there a lot of amazing teachers on youtube. But on that long list, you certainly stand out to be one of my two favorites.

  • @codegully_channel
    @codegully_channel 5 років тому +9

    The course is very well done. Thanks a lot for sharing it for free. It's worth a lot. I enjoyed it. Thank you for all the effort you put in.

  • @Soundflowmusicacademy
    @Soundflowmusicacademy 3 роки тому +1

    This is fantastic, thank you Colt! I must say, some of the features you covered are deprecated such as file-loader and 'clean-webpack-plugin' as they are included modules with Webpack 5. If you ever feel like making an updated version of this course, that would be awesome. Either way, thank you for putting in the time!

  • @kasrylewka
    @kasrylewka 5 років тому

    I tried to get a a grasp of webpack several times and finally I have it ! Awesome explanation, thanks a lot! I am going to bundle all my projects straightaway :-)

  • @UrbanBDKNY
    @UrbanBDKNY 5 років тому +5

    Great series. I am familiar with Webpack, but as with everything in programming that you don't use all the time...you forget a lot. You get the hang of it and then you maybe don't set up a new project for 2 years and forget it all lol
    The entire series is great. Starting from scratch and showing how to gradually add loaders and plugins to make the development better is great as well as showing how to develop diff configs for development and production
    Thanks for the hard work putting this together

    • @ColtSteeleCode
      @ColtSteeleCode  5 років тому +1

      Glad you liked it, Billy! It's really nice to hear from students who make it through the entire mini-course. As far as forgetting things... if I had to remake this Webpack demo from memory, I would have a really tough time. I constantly reference old code and previous examples when I'm working on something, especially Webpack because its syntax is so specific. So you are not alone in forgetting a lot!

    • @UrbanBDKNY
      @UrbanBDKNY 5 років тому

      @@ColtSteeleCode dev life lol unless you create a new project every few months, you forget most of it. You remember a few things that stay, but specifics go lol I been working with webpack for like 5 years but usually just modified configs. I did not know how to start something from scratch. When you want to start a project and are excited, the last thing you want to do is spend time going through their docs to build a new config

  • @kulithnajika2565
    @kulithnajika2565 4 роки тому

    finished the series. watched all videos. keep up the greater work

  • @usua1myanmarian
    @usua1myanmarian 2 роки тому

    I've finished! Woo! Thank you Mr.Steele for this tutorial, now I'm not that intimidated with webpack anymore.

  • @rameshkomarasamy
    @rameshkomarasamy 5 років тому +1

    Colt! Thank you so much for this awesome tutorial. I couldn't just get out of my seat from tutorial 1 to up until here. You made my day. I'm very confident on webpack now. Thanks a lot again!

  • @petrsimonek5362
    @petrsimonek5362 5 років тому

    Colt, thank you for this. Planned to watch only one video and ended up watching the whole series, just because you are explaining things in an awesome manner. Thanks for the github code as well. All the best!

  • @lookintomyeyes2681
    @lookintomyeyes2681 4 роки тому

    I have finished with the series replicating and modifying along with ur code base, thq so much for all the amazing content that u always present us with

  • @Brunoenribeiro
    @Brunoenribeiro 5 років тому

    Awesome course, man. I've been struggling with bundlers for some time because other tutorials just threw the configurations on me, instead of explaining each part. Thank you so much for taking the time. I'll share this with everyone I know :)

  • @gerardoparedes1299
    @gerardoparedes1299 5 років тому +7

    Thanks for the mini course , really helped me reinforce what I already knew !! great stuff as usual!

  • @sergiumare7259
    @sergiumare7259 5 років тому

    Very good course fom all points of view, complexity, ways of explaining, time duration, exemples. Well done.

  • @akashtakawale9074
    @akashtakawale9074 3 роки тому

    What a gold mine this is !! Such an amazing course !!

  • @Birandoo
    @Birandoo 7 місяців тому

    The best course I've seen. Thank you so much. Now it's making sense and not so scary.

  • @lost-mar-ble
    @lost-mar-ble 2 роки тому

    wow. one of a kind. Cant thank enough. I wish the basics ended here but there were more videos tracking more config options. Thank you very much Colt.

  • @nicolasvillafan
    @nicolasvillafan 5 років тому

    By Far the Best webpack Tutorial I came across; as always your teaching skills are outstanding! Great Job Colt.

  • @Vincent-xm2sf
    @Vincent-xm2sf 4 роки тому

    Oh God you’ve taught me everything i am recently looking for in an hour throughout this series. Ofc i need to practice it applying to my project from now on though lol. Big appreciation to you mate. Cheers!

  • @dimayasnohurskyi2805
    @dimayasnohurskyi2805 5 років тому

    After this series of videos I understood how modern frameworks works. Thanks!

  • @leonf.7893
    @leonf.7893 4 роки тому

    This is the best course on webpack I've found. Thanks Colt

  • @bradynglines5898
    @bradynglines5898 5 років тому

    I have to say, thanks so much for making this. This has really helped me jump into Webpack where it was a intimidating before, I feel much better after watching all of your explanations. Thanks again!

  • @e11world
    @e11world 4 роки тому

    I loved every minute of it. Definietly subscribed and hope to see more things from you especially on React and what you'd use for styling (instead of bootstrap/tailwind/bulma) if any obviously with scss.

  • @khotambakhromov
    @khotambakhromov 5 років тому

    Thanks a lot Mr. The best Webpack Course on UA-cam!

  • @joe-un1ky
    @joe-un1ky 5 років тому

    By far the best content on Webpack I've found. So helpful.

  • @innalukomska4623
    @innalukomska4623 3 роки тому

    Colt, thank you a lot for this step-by-step course, it's awesome! I've just used for last webpack version in scripts start command (package.json) 'webpack serve --config webpack.dev.js' instead of 'webpack-dev-server --config webpack.dev.js' and used curly braces for 'merge' and 'CleanWebpuckPlugin' const (webpack.prod.js) because of errors. So it's really helpful course. Thanks!

  • @olivercox6348
    @olivercox6348 5 років тому

    Cheers Colt! you have really great content on your channel. I have found this series invaluable for my understanding of the fundamentals and possibilities of webpack. Really fired off those lightbulb moments I was missing from reading the docs

  • @joseubaldocarvajal6472
    @joseubaldocarvajal6472 4 роки тому

    I have seen the entire course :). Thanks so much, I'm now more aware of all of the different Webpack configuration options and usage.

  • @atilaesousa4230
    @atilaesousa4230 2 роки тому +1

    Thank you for this one bro, god bless you

  • @kresimircosic3753
    @kresimircosic3753 5 років тому +2

    Bought your React Udemy course, I love how good you are at explaining things. Thank you boss.

  • @CarlosLopez-tm7bp
    @CarlosLopez-tm7bp 2 роки тому

    What a grate course! Thank you so much! Waiting for your next course!

  • @alexhitchins4339
    @alexhitchins4339 4 роки тому

    you should earn a gold medal for this tuts!!! thank you a lot! 🙏👏👍👌

  • @kubilayorman
    @kubilayorman 5 років тому

    by far the best intro to webpack out there, thank you very much!

  • @JassarDev
    @JassarDev 4 роки тому

    It's either I'm high because this is the last video or these are just funny LOL!
    That "alright" at 4:55 says it all!
    6:43 "large package, oh boy"
    Thank you so very much for this, it's amazing!
    A couple of notes:
    1. It seems that the new version of webpack optimizes the css without having to use [insert long name here] plugin.
    2. I'm going to look this up but it sounds like a good idea: using webpack with node and express (webpack-dev-server with nodemon)

  • @xlf14
    @xlf14 4 роки тому

    Excellent tutorial. Crystal clear explanation. Helped so much for a newbie like me. Thanks a bunch !!!

  • @_mdrizwanfk
    @_mdrizwanfk 2 місяці тому

    Amazing series! Thanks, Colt!

  • @ankitgupta9067
    @ankitgupta9067 4 роки тому

    Thanks a ton for making this video series. Keep up the good work.

  • @yanhuan1
    @yanhuan1 4 роки тому

    You're a great teacher Colt.

  • @jamiemackenzie9708
    @jamiemackenzie9708 4 роки тому

    This is great thanks!! I have built this out now and just basically reuse this project as my basic WP starter template, saves a bunch of time.

  • @throughdaniel
    @throughdaniel 5 років тому

    fantastic!! love this tutorial! very helpful and like you said "just scratching the surface" thanks colt very much appreciate this!

  • @maxnolano
    @maxnolano 5 років тому +1

    Colt Steele is a Man Of Steel! Fantastic content Super-Teacher-Man :D

  • @BAHADIRDOGRU0
    @BAHADIRDOGRU0 4 роки тому

    This is best webpack tutorial i ever seen. Only i need as part 11. splitting js files and lazy import js files for keep small the bundle sizes. Thnx

  • @mohitdas5292
    @mohitdas5292 4 роки тому

    Best series on Webpack!

  • @Gamegamblerbitsadwar
    @Gamegamblerbitsadwar 3 роки тому

    Great mini-course. Might need some updates but, the comment section was really helpful with that so you may not need any updates as such :)

  • @AndresGarcia-lo4yr
    @AndresGarcia-lo4yr 5 років тому

    Colt you are my new best friend!! Thank you so much for this tutorial. You have the gift of teaching. You saved my weekend!

  • @AbdulWahab-ev2ct
    @AbdulWahab-ev2ct 5 років тому

    just finished this playlist. I must say this is professional stuff. great to be your student

  • @linkchen9047
    @linkchen9047 4 роки тому

    10:05 I don't why but actually there is no terser-webpack-plugin package with Webpack 5, so I have to install manually.

  • @ramyniranjan5751
    @ramyniranjan5751 5 років тому

    Hi Colt what your thoughts about babel? Ijust wandering do we need babel theses days?

  • @rogerpence
    @rogerpence 5 років тому

    Colt--Thank you very much for this great course. It really helped me get up to speed with WP. You did a great job on this in every regard!

  • @ladymelven
    @ladymelven 4 роки тому

    This is such a super-useful tutorial, I loved every minute of it! Thank you Colt!

  • @kirkanos771
    @kirkanos771 5 років тому

    What a precious series of tuts. Be Blessed.

  • @israele.porfiriomoreno532
    @israele.porfiriomoreno532 5 років тому

    Thank you very much for your work and dedication. This mini course was amazing for my learning about this fantastic world of web development. Greetings from Mexico!!!

  • @11markrodgers11
    @11markrodgers11 5 років тому

    Is there a reason why you added the HtmlWebpackPlugin to optimization.minimizer in prod config but in dev config you added it to the plugins array? Had you put it inside the plugins array in the prod config would it still minify your html?

  • @geoffjames992
    @geoffjames992 5 років тому

    Bit late to the party, but just wanted to say a huge thank you for this series! Super helpful and very easy to follow 🙌🏼🙌🏼🙌🏼.
    Just what I needed, as I'm building a couple of apps, and webpack seems to be the way forward for what I need.
    Saved the playlist to share with my dev friends and for me to come back to in future.
    New subscriber well-earned 😎👍🏼

  • @DRocksRecords
    @DRocksRecords 4 роки тому

    Thank you Colt. It got me up and running for the first time with webpack. cheers

  • @LinuxForLife
    @LinuxForLife 5 років тому

    I follow all the course and congrats! Best Webpack 4 tutorial so far.

  • @rolandpierrelouis4013
    @rolandpierrelouis4013 4 роки тому

    Thank you for this awesome course Colt. When to use babel with webpack please ?

  • @sareek007
    @sareek007 4 роки тому +1

    Great Series, loved it!!!

  • @kinshuk54
    @kinshuk54 4 роки тому

    Just a quick question, suppose i have a react app and i am using the same class name for different elements across different Components and the class name has different style attribute for each Component, what is going to happen??

  • @shubhammittal9764
    @shubhammittal9764 5 років тому +1

    Why we have bootstrap twice now in production?
    Once in vendor.js and once again in the css file.

    • @alaindettorre5807
      @alaindettorre5807 5 років тому +1

      Because Bootstrap is a UI library split into JS and CSS different files. The CSS extract file holds the CSS part of Bootstrap, so its styling, while vendor.js holds all the Bootstrap JavaScript logic, including opening menus on click, showing tooltips, opening and closing modals etc.

  • @fedeviotti
    @fedeviotti 5 років тому

    Thanks Colt for this series of interesting videos about webpack. It is very cool!

  • @ged4
    @ged4 3 роки тому

    why is the HtmlWebpackPlugin inside of "optimization" instead of in "plugins" on the production config file

  • @edmundchan6601
    @edmundchan6601 5 років тому

    Instead of initializing HtmlWebpackPlugin under the 'optimization' property, can we continue to put it under 'plugins'? This way, the default JS minification wouldn't be overriden right?

  • @jinwookkim8511
    @jinwookkim8511 5 років тому

    This lecture deserves more views :)

  • @warsame2245
    @warsame2245 5 років тому

    Surprisingly I breezed thru these videos, love it.

  • @themynamesb
    @themynamesb 4 роки тому

    great playlist !! great work steve.

  • @marlynch
    @marlynch 5 років тому

    Incredible job on this series, Colt - greatly appreciated! When you teach, I learn. Time to start your Advanced Web Developer Bootcamp on Udemy!

  • @droidgeist
    @droidgeist 5 років тому

    How would I add an external CDN like font-awesome? In a non-webpack project, I'd just add it as a link tag. But how would I add it to your completed project?

  • @karthikdecibel
    @karthikdecibel 4 роки тому

    Hello, I have one question. I have been working on a static website. Which uses Grunt in combination with Handlebars to generate HTML. Using 'Watch' to concatenate JS, Build CSS from SCSS etc. In Dev mode i develop HTML on a local server then with Build command i make minified CSS and JS and Build HTML for deployment.
    Can i do the same in Webpack or is it recommended?

  • @RazerCrick
    @RazerCrick 3 роки тому

    Very nice series, gave a lot of insights of the underlying things for CRA. I am having one query: How can we make build release process of a component inside a large app independent.
    I have a react app
    name: example
    inside that i have
    component-a
    component-b
    component-c
    How can i make independent deployment for component-c without deploying the whole app (i.e example here) ?
    thoughts i tried:
    - component-c i can put on npm but that again required update of package in main app once i release a new version of component-c. resulting in a new deployment of the whole app.
    - Hosting on something like bit.dev.

  • @Tony.Nguyen137
    @Tony.Nguyen137 7 місяців тому

    This is the best webpack Tutorial

  • @thekuzicartoon
    @thekuzicartoon 3 роки тому

    any ideas on:
    [webpack-cli] TypeError: MiniCssExtractPlugin is not a constructor ?? webpack v5.37.1

  • @jorged1071
    @jorged1071 3 роки тому +1

    The whole tutorial was amazing! thank you very much for such a great content!

  • @shadow_3213
    @shadow_3213 4 роки тому

    Many many thanks !!! All episodes rated with thumbs up :-)

  • @wisnupratama5538
    @wisnupratama5538 4 роки тому

    finally i understand webpack :D thank you Colt!!

  • @chujingxl
    @chujingxl 5 років тому

    Thank you! You are a good teacher! I have learnt all your Webpack videos. They are very helpful.

  • @vcoski
    @vcoski 5 років тому

    Great introductory course. Thanks for sharing.

  • @vikalindeman9315
    @vikalindeman9315 5 років тому

    i bought yout bootcamp course on udemy, you are very good teacher, thank you for this too

  • @brunosouza3326
    @brunosouza3326 4 роки тому

    incredible mini course dude.

  • @humayraa3790
    @humayraa3790 5 років тому

    This entire series is amazing. Thank you so much

  • @mdshahadathossain7955
    @mdshahadathossain7955 3 роки тому

    Thanks for the tutorial. Would you tell me how to add multiple HTML pages to your project?

  • @dashingpix
    @dashingpix 4 роки тому

    Thanks for the video,. In my projects I may have many css files, like main.css, vendor.css and theme.css etc.. Ok so Is there a way to out put different css files without creating/generating JS entry files?

  • @Flame_Beard
    @Flame_Beard 5 років тому +1

    Dude, as always - amazing work! Thank you for your help getting my head around this beasty of a tool! :D

  • @pheotiman
    @pheotiman 2 роки тому

    For webpack 5 or above, it is recommended to use "css-minimizer-webpack-plugin" instead of the one mentioned.

  • @viniciusalvess
    @viniciusalvess 5 років тому

    Thanks for sharing this awesome course.

  • @ichepurnoy
    @ichepurnoy 5 років тому

    @Colt Steele, one glitch in the code: as of now, proper import for CleanWebpackPlugin would be like:
    *const { CleanWebpackPlugin } = require('clean-webpack-plugin');*
    These changes are because they removed 'export default'.
    Thanks a ton for these great series, veeery helpful! :)

    • @thekuzicartoon
      @thekuzicartoon 3 роки тому

      any ideas on the MiniCssWebpackPlugin? tried above on it but no go. get [webpack-cli] TypeError: MiniCssExtractPlugin is not a constructor error...

    • @ichepurnoy
      @ichepurnoy 3 роки тому

      @@thekuzicartoon sorry, no ideas, I cannot memorize all possible tips and tricks. It's the same old googling and RTFMing , each time.

    • @thekuzicartoon
      @thekuzicartoon 3 роки тому

      @@ichepurnoy thanks for the reply. I get it, remembering everything is impossible! In fact, now that a few days have passed i must go back and see if i even fixed the issue! (and if so, put the solution here!) Thanks anyway. If you find something along the way, lmk!

  • @Salemoche
    @Salemoche 4 роки тому

    Hey Colt, thanks for the great course
    I have a question: when trying to extract the css with the MiniCssExtractPlugin I'm getting the following error: ERROR in ./src/scss/main.scss
    No template for dependency: CssDependency
    Google hasn't lead me to a satisfying solution nor really explained what this even means
    Could you help me?

    • @Salemoche
      @Salemoche 4 роки тому

      ok I'm a stupid mf: i returned an object instead of an array in the plugins function. for anyone encountering this problem, it is almost certainly some syntax problem

  • @shubhasingh7583
    @shubhasingh7583 5 років тому

    Great content Colt, thanks for putting this up. This helped me a lot.