❗❗ IMPORTANT UPDATES ❗❗ ### webpack-dev-server update `webpack-dev-server` released version 4 on 2021-08-18, which has a breaking change for this video. In the `webpack.config.js` file, under `devServer`, the `contentBase` property has been changed to `static`. If you use `contentBase`, like I do in the video, you'll get an error. You can either use `webpack-dev-server` ^3.11.0 (which is what this video uses) and just follow along with the video, or you can install the latest and update to the required change. Here is the link to the webpack docs for this property: webpack.js.org/configuration/dev-server/#devserverstatic And here is a link to the migration guide from v3 to v4: github.com/webpack/webpack-dev-server/blob/master/migration-v4.md ### WINDOWS USERS Some of the scripts I make to set environment variables will not work on Windows. I've made a video to fix that issue here: kzbin.info/www/bejne/qmrSnIh6oLeIesU ### Hot Reloading issues Your issue might be different, but just in case -- If you are having troubles with hot reloading check out this video, also in the Webpack playlist on my channel, which shows a fix: kzbin.info/www/bejne/on_Oh6GagKioo5o
@greenhermit62883 жыл бұрын
Hi there, I have been following this tutorial recently, am up to the automated cleaning and html template and skipped the react section. I want to add one issue I have been having (and it could be me or a difference in the webpack versions) but when an image asset is bundled in the js file (if the type prop is "asset/inline") it appears to be included inside my "main.css" file not my main.js file as in yours. Not a big deal for me but could be worth noting. Similarly, I didn't have to add a separate rule in my webpack config for it to handle images, it loaded them all up by default. Cheers for the tutorial and also the diligence to keep it updated, is a very good thing to do.
@SwashbucklingwithCode3 жыл бұрын
@@greenhermit6288 I'm not sure I follow, what does it mean to have an asset included in the css file? Do you mean just the link to the asset, like `background: url(imagelink.jpg)`?
@trungvu68143 жыл бұрын
@@SwashbucklingwithCode Hi, can I still use react refresh? it noticed that react refresh use webpack-dev-server v3 and can't resolve when installing. Thank you
@SwashbucklingwithCode3 жыл бұрын
@@trungvu6814 I haven't used v4 of dev server on any projects so I couldn't say how it affects react refresh. If it's a peer dependency issue, you can always use --legacy-peer-deps, but for long term projects you usually want to avoid that.
@xxxtalxx3 жыл бұрын
Thank you for being considerate enough to mention updates like this. Saved me a headache.
@k4qdex2 жыл бұрын
jesus teaching us webpack. what a time to be alive
@mykolao3 жыл бұрын
Thank you, Jesus! This is exactly what I was praying for :D
@riendlyf3 жыл бұрын
Твой коммент сделал мой день!))
@shfunky3 жыл бұрын
Haha xD I have the same feeling right now.
@kabs293 жыл бұрын
🤣🤣
@i8ET3 жыл бұрын
I was thinking a mix between Jared Leto and Jesus 🤣
@Ianmat552 жыл бұрын
Just saved me hours of banging my head against the wall trying to figure out why my images aren't loading. Thanks.
@claudiobaumgartner27603 жыл бұрын
Honestly I can't see any reason why you don't have thousands of followers by now. Quality content, nice pace, all for free! Amazing! Thx a lot.
@SwashbucklingwithCode3 жыл бұрын
Thank you kindly. The channel is still relatively new so I'm content with the growth pace right now.
@shfunky3 жыл бұрын
+1!
@frontend.experiencetech3 жыл бұрын
OMG, this is the best Webpack detailed tutorial ever. I wish it reaches millions of views and likes. Thank you for making this video with such details.
@SwashbucklingwithCode3 жыл бұрын
Thank you, truly. It means a lot to me, and my motivation, for you to say so.
@anthonymarquez25423 жыл бұрын
The best video that actually explains the webpack config properly, without assuming people's knowledge about the subject. ♥♥♥
@Phreshie912 жыл бұрын
I stopped coding this time last year because of how lonely it can be for a person like me. I've been wanting to pick up the gauntlet again , and this video is one of the first resources I used to review. Just as valuable as the first time I watched it! 🙌🏾 I hope you don't get discouraged by the low subscriber count...this is serious one of the best resources I've ever come across! THANK YOU!!!
@SwashbucklingwithCode2 жыл бұрын
Thank you for the kind words. I still plan on making more videos, I just had too much going on and needed a break.
@Phreshie912 жыл бұрын
@@SwashbucklingwithCode yay! Notifications are turned on...looking forward to more videos! 🏴☠️
@SwashbucklingwithCode2 жыл бұрын
@@Phreshie91 Thanks again for the support.
@hasantktl3 жыл бұрын
Really priceless tutorial. You use state of the art dev methods and explain them step by step. You dont hide some of your knowledge and this is really deserves millions of like.
@SwashbucklingwithCode3 жыл бұрын
very kind, thank you.
@sithmech38033 жыл бұрын
After hours of trying to fix my webpack woes by googling each problem, I stumbled upon your excellent video. I normally don't watch videos of this length, but you delivered clear and concise information in an incredibly engaging way. Thank you.
@SwashbucklingwithCode3 жыл бұрын
Thanks for letting me know. Video length is tough, since a lot of time is required for topics like this. It's hard to know if a long video is going to be worth the investment.
@iamprincemuel3 жыл бұрын
@@SwashbucklingwithCode They'd just use the Pomodoro technique
@RyantheCanuckpirate2 жыл бұрын
@@SwashbucklingwithCode This is how I discovered your channel, so you've got at least 1 sub as a result of this tutorial. I'm brand new to module bundlers and copy/pasting the instructions isn't satisfying. It works, but I like to have a basic understanding of how my tools work so I can troubleshoot errors with less stress. Spending a few hours on learning webpack has definitely made my life easier, so thanks again
@kozmikhero67493 жыл бұрын
Took a 18 month break from coding only to return to everything being so different. Thank you subbed for sure. Theres so many tiny gotchas for these libraries that most people don't even mention!
@SwashbucklingwithCode3 жыл бұрын
It is certainly a blessing and a curse, how fast the industry moves. There are few days a week that I am not studying, and I still feel overwhelmed.
@who.is.jaytee3 жыл бұрын
@ 42:06 thank god for this note about the browserslist file and the bug. I literally spent 2 days trying to figure out wtf was wrong with my live reload/hmr. I have my webpack.config set up a little differently but this explains it. 🙏
@SwashbucklingwithCode3 жыл бұрын
It got me good as well, so much so that I had to make a video just for solving it.
@arjunp63233 жыл бұрын
Cannot thank you enough mate ,not even a comprehensive course could cover what u have thought over here, I could never get a proper video for a complete configuration of webpack to know how it works, until I came across this video of yours. thank you once again for investing your time to share the knowledge ..
@SwashbucklingwithCode3 жыл бұрын
I'm happy it helped, and thank you for letting me know.
@saeedm9772 Жыл бұрын
I used it to refresh my memory. That was great tut with great information. Thank you. Keep it up.
@skoodath3 жыл бұрын
Although I am late to the party, this is the best explanation of webpack and how it works I have ever seen! I haven't even finished watching the video yet. Great job!
@boribilder_sem_basal2 жыл бұрын
Thank you bro, 1 year after and you still helping a lot of people!
@SwashbucklingwithCode2 жыл бұрын
Happy to help. I have much more tools I need to cover but finding time has been quite difficult. It's always nice to get some positive reinforcement for making time, thank you.
@brod5153 жыл бұрын
@1:17:51 for windows users, use the npm package rimraf. instead of "rm -rf dist" use "rimraf dist"
@CodeCraft872 жыл бұрын
It was help me thanks alot...
@brod5152 жыл бұрын
@@CodeCraft87 no problem
@TwanvB3 жыл бұрын
This is great! Im trying to understand webpack and your tutorial is really helpfull. Minor thing im able to add: you can set, clean: true, inside output. This will clean your dist folder without any extra plugins. Might save you some time.
@SwashbucklingwithCode3 жыл бұрын
Thank you. Someone else pointed this out as well but I haven't tried it out yet.
@danet93302 жыл бұрын
your advice is really priceless, thank you so much!
@nikhilkhatter46892 жыл бұрын
@@danet9330 i tried and got a success on it as well, thank u.
@miray64973 жыл бұрын
I was watching your video "Webpack 5 CSS Walkthrough" to learn about webpack and I was confused about browserslist thing. Then you add a new video about that! This is my lucky day!
@SwashbucklingwithCode3 жыл бұрын
I actually thought about doing a little video just for browserslist, but hopefully between these 2 videos there is enough on it. Let me know if not.
@markuskraft60593 жыл бұрын
If you have problems deploying: If you are developing on Windows add cross-env and rimraf to your project. Then use "build": "cross-env NODE_ENV=production webpack", and "clean": "rimraf dist" to your package.json . I was going crazy because I did not keep in mind to check my platform(netlify is using a different shell)^^ Thanks for the nice Project Setup! I had a lot of fun following along.
@SwashbucklingwithCode3 жыл бұрын
Thanks for helping, I wish I could edit something back in to the video but I have been so removed from Windows development that it slipped my mind during the making.
@kevinbeckwith37702 жыл бұрын
Hey Jimmy, First, I want to say that this is a fantastic resource, I'm a complete newbie when it comes to webpack, and because of how clearly you explain what you're doing I'm having no trouble understanding it. For anyone interested you can type W100% to avoid getting pixels.
@shfunky3 жыл бұрын
I feel like my life has gotten a little bit easier after watching this video. Thanks so much for sharing your knowledge! I'm working as a frontend dev for only 3 years now and I wish I knew half of what you know. Hope you get millions of likes and views.
@SwashbucklingwithCode3 жыл бұрын
What a delightful compliment, thank you very much. And I assure you, I wish I knew much more than I do in a ton of areas and am always looking up to other devs, haha. It never ends.
@RyantheCanuckpirate2 жыл бұрын
This is a tremendous resource. Webpack was super intimidating when I tried to use it for the first time (reading the official docs). Having someone explain all the basic features was definitely worth the hours it took me to get me through the entire video. Also as a first time viewer I was definitely not expecting the last 30 secs. Perfect ending!
@SwashbucklingwithCode2 жыл бұрын
Thank you for the kind words and I'm always happy to hear the effort put into making the video was worth it.
@sairaj56603 жыл бұрын
Your videos are that bridge that transforms a person from an average developer to a 10X Developer, Thank you so much man ❤️
@SwashbucklingwithCode3 жыл бұрын
That is quite the compliment, thank you.
@dpdoescode3 жыл бұрын
Great video 👏 I love how you go through the git commits after each section to have a quick overview of what you've done. Great way of taking this in chucks instead of all in one go.
@SwashbucklingwithCode3 жыл бұрын
Thank you, I was wondering how people would feel about that, as it does slightly add to video length.
@jtrjkgfjrdtje3 жыл бұрын
Do you have video with routing - multi page project with templates (EJS for example)?
@SwashbucklingwithCode3 жыл бұрын
Do you mean single page app routing, like react-router, or something else? I don't have one for that currently. I don't use templating languages anymore, there isn't much need with the modern JS frameworks, so I haven't covered them, but I used to use them all the time.
@jtrjkgfjrdtje3 жыл бұрын
@@SwashbucklingwithCode Thanks! I know there are many roads (webpack/libraries config) and it is hard to cover them all. What I have in mind is simple node.js express multipage app with use of some templates (EJS/handlebars/jade etc.). For example - stackoverflow.com/questions/68246882/webpack-5-express-ejs-templates - there are so many questions on this subject, and most videos/articles do not cover them. You as an expert, could explain these steps - how to bundle/not bundle, how to have addition css files/or use them (css styling) inside js files, how to convert templates without modifying it's syntax, etc. I think many ppl would benefit from your explanations/presentations.
@johnhenryjohnhenry-tz8xm3 жыл бұрын
@@jtrjkgfjrdtje images stored in a folder not inside JS file would nice too - just something to reconsider, to fully understand Webpack 5 configuration options.
@damiannora61733 жыл бұрын
I cannot config webpack with ease either. Some more advanced approach are not well documented.
@SwashbucklingwithCode3 жыл бұрын
@@jtrjkgfjrdtje Well I certainly don't consider myself an expert. Some of the setups you have mentioned, I haven't dabbled with in quite some time. Though I do agree some more thorough walkthroughs for all the types of combinations in the JS ecosystem are highly needed. I spent a lot of time confused on the topics and not knowing where to turn. I'll think on it, ty for the suggestions.
@jjaxner3 жыл бұрын
Thank u so much. I've learned so much from this video. Love how you don't just throw in a config-parameter but take time to explain what it does and show what it solves.
@andrewperez78442 жыл бұрын
Wow man thank you so much for this content. This helped me getting a legacy project at my job more up to date with Webpack 5. You also helped me understand this whole complicated concept as well. Love your calm demeanor and explanations. New sub!
@SwashbucklingwithCode2 жыл бұрын
Fantastic. Glad to be of help.
@miray64972 жыл бұрын
I'm watching this whenever I need webpack it's so explanatory. Thank you so much!!
@SwashbucklingwithCode2 жыл бұрын
Awesome, thank you for saying so.
@ruslanfreelancer70822 жыл бұрын
Never used webpack to build my projects so it looks a bit complicated for me. Thanks for the tutorial, some things became clearer now.
@satyaspb13 жыл бұрын
Really appreciate your knowledge, teaching style and the patience to teach as depth as possible. thank you so much learn a lot from your single video.
@patsionly3 жыл бұрын
OMG! This was my best course ever, I don't know why this video has dislikes. I'm a Mexican speaker but you're too good to specify everything! Commonly, It's too hard for me to understand English but I don't know why I could understand everything you said in this video. Thx a lot!
@SwashbucklingwithCode3 жыл бұрын
Fantastic. I'm happy to hear it was easy to follow.
@anuragnair56723 жыл бұрын
This is the best tutorial on the internet for webpack . Learned a lot from it!!!
@utmostcreator3 жыл бұрын
Subscribed, immediately after checking out a few of chapters! Descent quality!
@JoelRemix3 жыл бұрын
More than decent. Superb!
@utsavojha29533 жыл бұрын
Rewatched this for the 3rd time, Jimmy youre videos are awesome and we all hope you keep uploading this amazing content on here.. You are really awesome for doing this, cheers!
@SwashbucklingwithCode3 жыл бұрын
I really appreciate that, thank you. The time factor is always a battle, but I plan to keep trying for awhile.
@abdussamad03489 ай бұрын
Amazing knowledge, well explained. The transition to react is too smooth.
@skdehuri3 жыл бұрын
Maybe it's my lucky day I found your video on my recommendation. Thank you so much for this walkthrough. I was struggling to configure react fast refresh until I found this one. Great explanation and the small details and errors you focus on are really interesting.
@SwashbucklingwithCode3 жыл бұрын
I had a lot of struggles with react refresh and the new Webpack+Babel versions. Thank you for letting me know the troubleshooting parts were useful, that's what I'm trying to balance the most right now in my videos.
@luiscortes65632 жыл бұрын
Thank you so much for this! I ran until a couple of “gotchas” that you mentioned and you dramatically reduced my downtime.
@SwashbucklingwithCode2 жыл бұрын
Nice, glad it helped.
@mubashirwaheed4743 жыл бұрын
I just hit gold. Thank you so much
@mikh2183 жыл бұрын
Thank you for the webpack tutor! It would be so good to add the typescript at the end =)
@oortcloud210 Жыл бұрын
Great video - the changes made in WebPack 5 can be difficult to unpick when trying to set up a project with babel, react, less, css, images, ESLint etc etc this really helped me find which options are still applicable and which are changed. Thank you.
@onlyformyselfcom3 жыл бұрын
Wow, thank you for this tutorial!!! Webpack is entirely new world for me and after this video, it works!!! I can't believe it :) PS: I am so fascinated, so this is the first video on KZbin I have ever put a comment 🤞
@SwashbucklingwithCode3 жыл бұрын
Well, then I am honored to have earned the first comment.
@iamprincemuel3 жыл бұрын
This is awesome! Hard to find gems like this. Thanks a lot
@suneetjena97882 жыл бұрын
5 mins into the video and I have subscribed him already !!
@SwashbucklingwithCode2 жыл бұрын
Thank you.
@joseortiz72392 жыл бұрын
Excelente video, bien explicado. Gracias.
@mohamedhany25393 жыл бұрын
Just as I wanted in one video. Thanks man Maybe in a future video, you would make a video about MPA "Multi-Page app" with Webpack 5. It will be great.
@PeterFullen3 жыл бұрын
I really appreciate these videos. This is the way they should be teaching React to beginners. Using create react app handcuffs some people. They do not understand how the code then gets bundled for production.
@edwardbaldacchino52843 жыл бұрын
Awesome video, I've learned so much from it. In case anyone hasn't said it yet, publicPath just adds on to the path value in output (1:05:00)
@SwashbucklingwithCode3 жыл бұрын
Fantastic to hear. And about publicPath, do you mean it is for appending more directories to place the CSS in?
Great tutorial and content. I followed it all through and deployed to Netlify. I added Typecript as well. The process is a bit more smoother with most of the mentioned bugs fixed already. Thank you for your great effort for putting this together and the great tempo and your attitude -- relaxed! You did an excellent job!
@PeteSchroederJr2 жыл бұрын
Excellent video, thanks!! This will be my go to for set up!
@SwashbucklingwithCode2 жыл бұрын
Nice.
@0x7A693 жыл бұрын
What a time saver. Thanks for this vid.
@mateusmiguel_ Жыл бұрын
Thanks a lot for this video/project! I spent the weekend on this and definitely it was worth!
@SwashbucklingwithCode Жыл бұрын
Very awesome to hear, thank you.
@andregomes72323 жыл бұрын
This is real nice stuff. Thanks and congrats man
@SwashbucklingwithCode3 жыл бұрын
Thank you.
@arjunsah85612 жыл бұрын
Thank you so much for these amazing contents on webpack 5. If you could add some videos of integrating Material UI and or tailwindcss and or bootstrap 4/5, That will re really amazing because it will literally cover almost everything.
@SwashbucklingwithCode2 жыл бұрын
I shall ponder on it when I start back up again. Thank you.
@hafidhpradipta8113 жыл бұрын
you can use webpack merge, separate dev and prod config, but this tutorial is awesome. Thank for sharing, I learn a lot.
@SwashbucklingwithCode3 жыл бұрын
I've found separate configs to be a bit too complicated for most people learning Webpack. It's useful as your project grows though. If you have an implementation you think is simple I'd love to take a look, though.
@iamprincemuel3 жыл бұрын
@@SwashbucklingwithCode Ah, but I'm a newbie also new to webpack and on watching previous video before this one, I did understand the separate config method. Just uses the DRY principle. Anyways, I like your explanation better. Thanks
@SwashbucklingwithCode3 жыл бұрын
@@iamprincemuel That's good feedback, ty.
@BrewskaySA3 жыл бұрын
You did a great job on this video very informative and well thought out!
@bdk98303 жыл бұрын
thank you a lot covering this tutorial
@Ayman-jz6xs3 жыл бұрын
Honestly, I really liked the way you went through the commits too often after all the sections
@SwashbucklingwithCode3 жыл бұрын
Good feedback, thank you.
@vikram87in2 жыл бұрын
Such a clear and amazing video. Didn't even realise that it was 2 hrs long. Thanks a lot Jimmy 😍😍
@SwashbucklingwithCode2 жыл бұрын
Thank you for the kind words. I'm happy it was useful.
@DarkzarichV23 жыл бұрын
Thank you for the video, was willing to dive into Webpack 5 understanding long ago. Previously I had some basic understanding which was enough to achieve whatever I needed and understand most of whatever I copy-pasted from docs and stuff but now I understand it much better! Though, still something is left out, would be cool if you could go into optimizations like separating the code by chunks and stuff
@SwashbucklingwithCode3 жыл бұрын
Thank you. There are a ton of paths you can go down with Webpack usage, and my short term goal was just to raise familiarity with the basics for the many developers that use frameworks with webpack magic under the hood that they don't feel comfortable fidgeting with. code-splitting/chunks and tree-shaking, as well as library creating are things I intended to get into eventually but the time sync to do them correctly is quite high.
@BuildBrightCoders3 жыл бұрын
Thanks for a great tutorial and that you take time to read and respond to the comments. I noticed that when I added a background image in the css file, covered around 1:02:30, it seems to work without adding any extra rules to the webpack config. Do you know where support for this comes from?
@SwashbucklingwithCode3 жыл бұрын
One other person mentioned this, and after a quick look I didn't see mention of it in the docs, or recent release notes, though I could have easily missed it. It seems like they might have set it as a default in some update. You could always try and install the version of webpack from the video to see if you get the same behavior if you are curious.
@BuildBrightCoders3 жыл бұрын
Ok, I will try that out. Thanks
@utsavojha29533 жыл бұрын
Than you so much! Amazing walkthrough! Learned alot!! I was stuck in a loop of errors cause I couldn't set babel up with webpack, this is just awesome, i learned why were doing some of these things!
@sanghunlee68253 жыл бұрын
OMG you save my life THANK U SOOOOOOOO MUCH!!
@akilkudil3 жыл бұрын
Awesome friend. I agree with others that you deserve at least 100 times more subscriptions. Thanks for the knowledge share.
@SwashbucklingwithCode3 жыл бұрын
I'm glad I could pass on some learnings, and even learn some new things in the making.
@ShubhamGupta-qk9uq3 жыл бұрын
Thanks for all the knowledge! , really like your style of teaching
@mikebhart3 жыл бұрын
thankyou so much for this, helped me out loads.
@raymondvu21732 жыл бұрын
Great video 👏👏👏
@thepopstudio23543 жыл бұрын
You are freaking awesome dude, keep doing this man!
@gal88b2 жыл бұрын
Thank you so much. This video is absolutely fantastic.
@SwashbucklingwithCode2 жыл бұрын
Thanks for saying so, happy to help.
@boxfreshpidge3 жыл бұрын
Webpack Code splitting would be great!
@SwashbucklingwithCode3 жыл бұрын
I'll likely do some more advanced Webpack vids in the future, but I need a break from it for a little bit and I need to get some variety out there. Thank you for the suggestion!
@MingLiHI3 жыл бұрын
Really awesome work! I learned a lot of webpack knowledge from your video.
@SwashbucklingwithCode3 жыл бұрын
Glad to hear it.
@connerlinzy88893 жыл бұрын
Exactly what I needed. Thanks!
@gredev2 жыл бұрын
Amazing! You just solved one of my main problems man. Thanks a lot.
@SwashbucklingwithCode2 жыл бұрын
Glad to help.
@polozhitelen3 жыл бұрын
can't believe I'm learning webpack from John Wick!!!
@PrajwolOnta3 жыл бұрын
Awesome, tut!!!!!! Just one thing, apparently contentBase has been changed to static now.
@SwashbucklingwithCode3 жыл бұрын
Ah, looks like that may indeed be the case. I'll have to see if we get a deprecated warning then. Thanks for letting us know!
@vijaykumarreddyalavala37133 жыл бұрын
Just when I need it. Thank you so much
@wunderbarrecordings3 жыл бұрын
Thumps up,mate for this work! After the 'Automated cleaning and html template' section the main.js add to the head instead of the end of body..is this correct?
@SwashbucklingwithCode3 жыл бұрын
Oh, I see what you mean. I definitely should have covered that, but placing it in the `` tag with `defer` is a more "modern" feature, so that is fine. It's essentially a way of telling the browser to start downloading the script early, but defer running it until the DOM is ready, which can be faster than just placing it at the bottom of body. I still see some debate on best practice but placing it in `` with `defer` is the norm now in my experience, and it isn't something you should worry about until you are getting deeper into case by case performance land.
@wunderbarrecordings3 жыл бұрын
@@SwashbucklingwithCode Yeah, ist seems to be good. In this case it doesn't matter whether it's defer or async.
@remo71683 жыл бұрын
Great tutorial about Webpack 5!
@ranvijaysingh79672 жыл бұрын
Thanx man it really helped to get started with webpack and reactjs
@TobiasLorsbach-Mainz2 жыл бұрын
So, so helpful! Btw, I`m using browsersync instead of webpack-devserver, works great also on remote hosts with proxy for app testing on multiple devices. You just need the webpack plugin.
@SwashbucklingwithCode2 жыл бұрын
Browsersync is really great for that. I haven't used it in a bit but I used to use it a ton when I did more of that work.
@tylerduprey73553 жыл бұрын
I really enjoyed this course! Thank you.
@alexmachin17853 жыл бұрын
Great tutorial. Quick question about the react-refresh section. So when I cause an error on purpose, correct it and save it refresh though I get the following error: "(0 , date_fns_format__WEBPACK_IMPORTED_MODULE_1__.default) is not a function " I can refresh the page, but I shouldn't need to. Weirdly I only get this error when I use the "date-fns" library, without it behaves fine. So I'm either missing something or there is a problem with my webpack config.
@omkarkulkarni36443 жыл бұрын
You just got a subscriber. Awesome tutorial. Concise and to the point .. best luck :D
@greatauntmuriel3 жыл бұрын
this is exactly what I needed rn thank you!!
@SwashbucklingwithCode3 жыл бұрын
My pleasure.
@williamm200 Жыл бұрын
bruuu this rocks muchas Gracias !!!
@ВикторКосилкин3 жыл бұрын
thx for this video!!!! but it doesn't work for me 'npm run build-dev". changed package.json and webpack.config.js as in video. but I have this error: "SERVE" is not internal or external command, executable program, or batch file. Help please!
@SwashbucklingwithCode3 жыл бұрын
My guess is you are on windows, and if so, the pinned comment has the answer. You have to put `set SERVE` on windows.
@Loekasjenko3 жыл бұрын
@@SwashbucklingwithCode I had this one too (using WIndows). Earlier in the tutorial, the use of 'set' also didn't do it for me. I used it like: "build": "set NODE_ENV=production webpack" but this worked for me "build": "cross-env NODE_ENV=production webpack" so i tried it on the start script aswel and worked like a charm "start": "cross-env SERVE=true webpack serve",
@ram-bk4mu3 жыл бұрын
Thanks dude, i like the way you explain stuff!
@SwashbucklingwithCode3 жыл бұрын
I'm very glad to hear it!
@mosherube79043 жыл бұрын
Great video! I've been struggling with webpack so this video has been a real light! I actually encountered no issues npm run building when running and using my image at first. I didn't even need to use the rules in webpack. But I still plugged in your code and it broke for the jfif images when I used asset inline. Idk if things have changed for images on webpack since this video came out.
@jonasgraae53113 жыл бұрын
Thanks for a great tutorial ! This really helped me to understand the images/assets with react, and pickup some other nice tricks. I have not been able to find that many videos with webpack 5, so you should really consider during a tutorial on udemy, with an extended version of this video and a beginners build project in React!
@SwashbucklingwithCode3 жыл бұрын
I'll definitely consider it. It's pretty tough keeping up with the videos as it is, so I'd probably have to take time off to pull that one off.
@boxfreshpidge3 жыл бұрын
Great timing!
@ynorouzi3 жыл бұрын
It saved my life. Thank you a lot
@lesiakutran35233 жыл бұрын
thank you for everything you do!
@domemvs3 жыл бұрын
Everybody who uses create-react-app should see this at least once.
@omar95net Жыл бұрын
Great and wonderful explanation, I got to know the channel recently and I follow you. Thank you for everything A note in the Browserlist section, specifically 42:15, when I update, the changes appear immediately without adding anything Is it a new update in Webpack?
@coach_chonko2 жыл бұрын
Thank you for the video. Webpack configuration is a nightmare for newbies
@SwashbucklingwithCode2 жыл бұрын
It definitely is. It is a very powerful toolset that has greatly improved ease of use but it can still be a lot to take in. I highly recommend giving Vite a try if it's your own or a newer project.
@lecodefrancais2 жыл бұрын
Thank you, Great tutorial, the most effectif i ever seen. On webpack 5.72 it seems that we don't have to add "Assets Modules" in order to load images from css or scss files! On this version when i add a background image url on my css file or scss file, image appears on browser with no rule or test for these kind of files (png, svg, jpg, etc.) I don't found information on webpack website. Since version 5.20 we can add the option module.exports = { //... output: { clean: true, // Clean the output directory before emit. }, }; in order to clean the dist folder without
@aryansingh21052 жыл бұрын
Haven't watched the video, although youtube recommended. I just wanna say dude you look DOPE 😎🤟🏻
@SwashbucklingwithCode2 жыл бұрын
Why thank you. Unfortunately the long hair is gone now, but I'll likely grow it back next winter.
@anastasiiapedko38583 жыл бұрын
This video solved my build problems. Amazing presentation and explanation. Thank you! But to load pictures from a html-file, I used html-loader. Just added to rules : { test: /\.html$/, use: 'html-loader' } Without this, the images from the tag in html-file were not parsed.