I'm just going through all "Webpack 5" series, the quality of content is outstanding,,,
@SwashbucklingwithCode3 жыл бұрын
Lovely to hear, ty.
@ksorv4 жыл бұрын
Just wanted to let you know that what you've started is great. Please keep making these videos. I can see you getting the attention soo. ❤️
@SwashbucklingwithCode4 жыл бұрын
I really appreciate that, and I shall keep doing my best.
@9gager873 жыл бұрын
I was about to buy a webpack course on Udemy but then I came across your channel and never looked back. Your videos are really awesome. Don't ever stop making them!
@SwashbucklingwithCode3 жыл бұрын
Thank you, that's cool to hear.
@alberuniazad4412 Жыл бұрын
Great explanation! This is what I was looking for all day!
@johnthirlaway673 жыл бұрын
Massive thank you, I had a CoreJS gotcha and couldn't work it out till I found your tutorial!
@SwashbucklingwithCode3 жыл бұрын
Awesome!
@dechobarca3 жыл бұрын
I don't comment often on videos, but honestly thank you so much for this and the previous 40 min video of the series. Started learning Babel a day or two ago, only to find out that I also need Webpack. But their documentation is not user-friendly or beginner friendly at all, like they tell you "do this, but also there are 3 separate ways to do this, and by the way while doing A, keeping in mind that it might require B for it to work properly, also here are a bunch of other tools we use that you also need to learn about". So it got overwhelming pretty fast. I think you've done an excellent job here explaining how to set this up properly while also covering many of the potential caveats and stuff, but MOST importantly what is actually going on behind the scenes which is really important, otherwise we're just hacking/cheating our way through. So cheers once again, you have no idea how much time and frustration this saved me.
@SwashbucklingwithCode3 жыл бұрын
Thank you for taking the time to write this. I went through the same struggles awhile ago, and just carried on copy pasting things until they worked. At some point I decided I wanted to spend some time and try to understand what was going on so it wasn't all so mysterious. Well, it still is, but I figured I should try making the video I would have wanted back then.
@dechobarca3 жыл бұрын
Copying and pasting configs from the docs until they all failed for one reason or another was pretty much where I got stuck as well, having really hard time to comprehend what exactly is going on. And I've read a couple of other tutorial articles online, but they either didn't go in such depth to explain how or why something is happening, or were outdated or related to React and so on, which only made things more complex for my case. Well now after watching this I rebuild my configs from scratch (they are almost the same as your github repo) and even learned how to use SourceMapDevToolPlugin, which would have been an absolute mind-f**ck before watching your video. So thanks once again, you did a pretty nice job at making the video you would have wanted, it happens that it worked great for me as well. Best of luck to your channel (which I will be keeping an eye on) :)
@nishant.c3 жыл бұрын
Stumbled upon this channel while searching for webpack bundle optimisation tips, and I am highly impressed with the quality of content in this channel. It's certainly more than just "Yet another tutorial channel", You are doing a great job here, really appreciate your effort and time, looking forward to more from your channel.
@SwashbucklingwithCode3 жыл бұрын
A lovely thing to hear on a Friday morning, thank you.
@dynerushd75174 жыл бұрын
These webpack series really helped me out, Thanks!
@SwashbucklingwithCode4 жыл бұрын
My pleasure, thanks for saying so!
@normamendonca2 жыл бұрын
Awesome! Really appreciate the areas you've focused on.
@SwashbucklingwithCode2 жыл бұрын
Cool to hear, ty.
@miladkarimi81122 жыл бұрын
the quality of content is really excellent!👍
@SwashbucklingwithCode2 жыл бұрын
Thank you.
@smaragd_2 жыл бұрын
Very nice video and well covered topic with key issues occurring out of it. Thank you!
@spondzi9112 жыл бұрын
Hey! Just wanted to tell you that I love your intro. Such a great climate.
@SwashbucklingwithCode2 жыл бұрын
Thank you. I put a lot of effort into it so that means a lot to me.
@cryptobrarry11 ай бұрын
Thans for video. How do you think is it any sense to compile two main.js files? with polyfils and with polyfils? Second would be pretty small. And we can check on server side by user-agent the browesr and connect different main.js in the src attribute?
@adconde13 жыл бұрын
Just wanted to say thank you for sharing this knowledge. It is very good content, keep it up.
@SwashbucklingwithCode3 жыл бұрын
You are welcome, and thank you the feedback.
@WarriorPega4 жыл бұрын
This is incredibly thorough! Really appreciate all the insight you provided. I'm very new to bundlers, webpack, babel - the whole lot of them. This cleared up a lot of what was confusing to me about setting up specific targets and taking advantage of newer features!
@SwashbucklingwithCode4 жыл бұрын
Awesome! Yah, it's a wild world to get into at first. I put off learning it for the longest time and I wish I had not. Thus the motivations for this series to teach others.
@santhoshraghavpidathala37014 жыл бұрын
Indepth tutorial, very very nice 👌. Please continue series on webpack with postcss, purifycss, corejs etc
@thangha82893 жыл бұрын
Hey dude, that is the exact thing I have to deal with. Thank you so much, really clear!
@SwashbucklingwithCode3 жыл бұрын
Awesome, thank you for letting me know.
@zoachim4 жыл бұрын
25:10 agree on the less anxiety :D funny. great vid, looking forward to the React stuff.
@zoachim4 жыл бұрын
5:10 IE and their "document mode" has been a huge pain in my #. I was hoping to find some answers here :D my latest app at my job shifts document mode to IE10, while everyone else's to IE11. In your case though it's probably because of some missing html meta tags, try . IE=Edge means "The highest supported document mode of the browser"
@SwashbucklingwithCode4 жыл бұрын
Oh, interesting. My work finally moved to just supporting Edge, now that it's all chromium, after we showed user percentages a bunch of times. So I, fortunately, don't have to deal with it much these days.
@evalarumbe4 жыл бұрын
Thanks for the clear demo and explanations! This vid helps the docs make more sense, adding some useful background and detail
@SwashbucklingwithCode4 жыл бұрын
Fantastic. Thank you for letting me know.
@gimba90523 жыл бұрын
your videos are exceptional, they are easy to understand even for beginners. keep up the good work❤❤
@SwashbucklingwithCode3 жыл бұрын
Thank you.
@yurirech93012 жыл бұрын
I love you man, you saved my day!!! Thanks a lot!
@SwashbucklingwithCode2 жыл бұрын
Awesome.
@jsherborne922 жыл бұрын
Fantastic content, very helpful.
@SwashbucklingwithCode2 жыл бұрын
Glad to hear it.
@shreshthmohan2 жыл бұрын
Thanks for making this video. Finding these things in the documentation isn't that easy.
@augustom.gouveia93922 жыл бұрын
Very insightful, thanks a lot!
@SwashbucklingwithCode2 жыл бұрын
Awesome.
@lukmankodir58383 жыл бұрын
Thank you so much Mr.!
@ivan89pln3 жыл бұрын
Great video, especially for the IE Emulation tab gotcha.
@SwashbucklingwithCode3 жыл бұрын
Thank you for the feedback, glad it was useful.
@ivan89pln3 жыл бұрын
@@SwashbucklingwithCode It really was, thanks!
@ss.rajkgupta3 жыл бұрын
I was looking for just one minor solution and I already knew a lot of things in webpack 5 but then I ended up watching the whole playlist. I don't know why; probably the knowledge in your tutorials. Are you a Coding-Wizard from Gryffindor?😊
@britti733 жыл бұрын
This was really excellent! Thank you so much for sharing! ❤️
@rinotovar3272 жыл бұрын
Very sweet content, thank you.
@SwashbucklingwithCode2 жыл бұрын
noice.
@KustomJulius4 жыл бұрын
Great video, helped me out a ton!
@vivekranjan4373 жыл бұрын
Thank you for this explanation
@kevinmorte39593 жыл бұрын
Thanks. Greate video. As usual.
@SwashbucklingwithCode3 жыл бұрын
Good to hear, ty.
@Amir-zi1hj2 жыл бұрын
I need more of these videos 🤩
@SwashbucklingwithCode2 жыл бұрын
haha, nice. have you already checked out the Webpack playlist?
@Amir-zi1hj2 жыл бұрын
@@SwashbucklingwithCode Yeah I added some of them to my watch list, I like the ones that are explaining specific things, like this one and visualization ...
@SwashbucklingwithCode2 жыл бұрын
@@Amir-zi1hj I see. They seem to be a little less popular but they are valuable things to know (at least I wish I knew them earlier).
@vikram87in2 жыл бұрын
Thanks a lot. Great video again. 😍 Just one thing. Isn't the --save option the default while installing any package. Can't we just do 'npm install xyz'?
@SwashbucklingwithCode2 жыл бұрын
Thank you. Good question, yes it is the default option now but that's a relatively recent change and many people don't update their Node or NPM very often.
@vikram87in2 жыл бұрын
@@SwashbucklingwithCode thanks 😊
@musedoom3 жыл бұрын
Thanks for the video. I had some troubles transpiling the code but that was because I named incorrectly the file .babelrc with babelrc (without the point)...silly me. I saw my mistake the next day and everything was perfect :D
@SwashbucklingwithCode3 жыл бұрын
Easy mistake to make. There are so many things to keep in mind when covering a project setup, thanks for the reminder on that one.
@gno39393 жыл бұрын
4:26 - reason why you had to create .browserlistrc and add defaults query for webpack and not babel is because: entry property defaults to 'web' and when no browserslsit is configured it goes back 2 versions (doesn't resort to browsers list defaults).. when entry is 'node' it does the same. but when browserslist is configured webpack will look in there so it'll turn you bootstrap arrow func -> func declaration
@SwashbucklingwithCode3 жыл бұрын
Interesting, thanks for the insight.
@zoachim4 жыл бұрын
21:10 do you know if Create-React-App does this all of this for us? Would be interesting to understand what's going on under the hood
@SwashbucklingwithCode4 жыл бұрын
Good question, I don't believe they put polyfills in automatically. But how I'd test it is just look at the final output before and after a method (e.g. object.values) similar to how I did in this video.
@dmtoptech4 жыл бұрын
Thanks for great video. I get error when i use same project as yours with sass loader and post css specially when i use includes method in my JavaScript code can please suggest a solution cause i tried a lot of things but no one work the exact error appear in es.array.includes.js and this affect mini-css-extract-loader ans sass loader to not compile
@SwashbucklingwithCode4 жыл бұрын
Strange, I don't have that issue at all, and I've double checked by adding all the css loaders and plugins to this branch just in case. This is happening while using `"useBuiltIns": "usage", "corejs": "3.8"` in your babel file like in this videos example?
@dmtoptech4 жыл бұрын
@@SwashbucklingwithCode thanks i get your code from github and I get same error but after adding exclude node_modules in css/sass/scss loader in webpack config the problem solved and i realize that sass file which cause the error. Thank you for your videos i hope you make more cause you give details that we need as beginners
@JoeBoo5324 жыл бұрын
Thank you for such a useful video! :D I have a question if you don't mind asking. What about spreads operator or optional chaining? how can we turn those on?
@SwashbucklingwithCode4 жыл бұрын
Spread operators are part of the default syntax that has been included for awhile through `@babel/preset-env`. Optional chaining is new, but recently added to the latest version of ES, so it is also automatically included as far as I've seen. I don't use anything for my projects that is in earlier stages of proposal, but Babel has docs covering how to use "proposed" syntax now that they've deprecated the "stage-0" type plugins.
@none0n3 жыл бұрын
My main.js is weirdly 39.5 KiB. Is there a reason why?
@lcoronelp4 жыл бұрын
Cool functionality to avoid dead weight in the main.js. But i think, normally the polyfills will be for IE11 (not all but the worst), webpack can put the polyfills in another file and load only if is IE11? (to avoid the weight in the most of browsers that didn't need that polyfills)
@SwashbucklingwithCode4 жыл бұрын
A good portion will but it totally depends on what ES version you are using, and sometimes browsers lag behind for various reasons as well. It's a great idea to serve only to IE, but the problem that arises is that you need a server to make that decision, and that also adds time. There are frameworks that do it but there are tradeoffs.
@lcoronelp4 жыл бұрын
@@SwashbucklingwithCode Could we use JS check to include the file (as the old times)? Something like: window.MSInputMethodContext && document.documentMode && document.write(''); Seeing those polyfills as a LOT of dead weight, i think maybe it would be worth. Thanks for share your knowledge and experience! :)
@SwashbucklingwithCode4 жыл бұрын
@@lcoronelp Ah ok, so a script that will fetch and load depending on browser after document is downloaded. It may definitely be worth it, though it would need to fetch and run as it parses that script if I'm understanding it correctly. That could totally be fine, just depends on "when" the code needs to run. Thanks for sharing.
@usmankiyani52094 жыл бұрын
Thank you John Wick coding dude 👏🏻
@SwashbucklingwithCode4 жыл бұрын
You are welcome. I will take this as a compliment.
@zivtamary3 жыл бұрын
Instead of creating.browserlistrc you can add "browserslist" to package.json and it will work the same! :)
@SwashbucklingwithCode3 жыл бұрын
You can, but I always prefer to have config files to keep package.json succinct and make it obvious with a glance at the files what types of packages are set up in the project.
@grantmoss49373 жыл бұрын
super useful vid. thanks
@alibidjandy63133 жыл бұрын
hi thank you for your video but I need to say you forgot to point in fetch because it doesn't work with core-js
@SwashbucklingwithCode3 жыл бұрын
Not sure what you mean. You mean importing `node-fetch`? If so, I don't really see that as a polyfill concern, that's just a browser functionality that doesn't exist with node, but perhaps I'm misunderstanding you.
@GauravKumar-ue7nz Жыл бұрын
You are soooooooooo Good.
@maksymdudyk17183 жыл бұрын
Thanks a lot!!
@SwashbucklingwithCode3 жыл бұрын
You are quite welcome.
@lifeisbeautifu13 ай бұрын
Thank you!
@Iammrunkown3 жыл бұрын
Your subscriber from India
@SwashbucklingwithCode3 жыл бұрын
Thank you, and welcome!
@babyloniane3 жыл бұрын
Hellooo, that's SO helpful, i spent a week to figure out how to make my shit work on ie11 lol. Huge time saving. btw do you know why template.content.cloneNode(true) dont work in ie11? what plugin are necessary to make it work ._.
@SwashbucklingwithCode3 жыл бұрын
I have not worked with html content template's yet, sorry. That does seem like a tricky one if it isn't directly importable from 'core-js'. You might need to find another polyfill source.
@babyloniane3 жыл бұрын
@@SwashbucklingwithCode I solved it by importing another polyfill. But thanks anyway, it's a nightmare to set up xD
@SwashbucklingwithCode3 жыл бұрын
@@babyloniane Glad you got it figured out. It can be quite exhausting to configure.