Thank you so much for this! I thought I had to live with the nightmare of figuring out every new terminal or different OS I use.
@SwashbucklingwithCode3 жыл бұрын
No problem, I'm sorry I didn't include it in the other Webpack videos originally.
@hyfydistro3 жыл бұрын
All gucci! I'm glad there was a follow up. These are just one of the things that are often left under the radar when you work so long in one environment (in this case, OS). ☺
@andriigromakov90803 жыл бұрын
Thanks a lot for adding a link to this video in 'Creating and Understanding a Basic Webpack 5 Setup'. It's very convinient. And many thanks for explaining how it should work.
@SwashbucklingwithCode3 жыл бұрын
Glad it was helpful.
@ajewoledamilola70082 жыл бұрын
Thank youuuu soo much. I have spent the last two days trying to figure out WHY my code wasn't running but this helps A LOT! Thank you so much!
@SwashbucklingwithCode2 жыл бұрын
Glad you got it sorted.
@stevebolman65182 жыл бұрын
You you ROCK! first time I have EVER seen the same instructor answer the same question generated by their own video. AWSOME!
@ppena120 Жыл бұрын
I've been looking for this answer for so long. Thank you
@andrewmoore45473 жыл бұрын
Mate you're an absolute hero. Most people just go ""eiugghghgh god not not windows"
@SwashbucklingwithCode3 жыл бұрын
I appreciate you saying so, thank you. It's easy to be in that mindset for anything outside your preferred setup, myself included sometimes. But what really matters is what you make, right?
@okidokiyowyow3563 жыл бұрын
awesome dude. I'm learning webpack and your videos are really helpful.
@caiohagge3837 Жыл бұрын
Thank you so much! Very helpful video!
@SwashbucklingwithCode Жыл бұрын
Awesome, ty for letting me know.
@mister_coode3 жыл бұрын
Your videos are great, thank you very much. I had problem with setting NODE_ENV with one ampersand, instead, i removed it completely and it worked ( cross-env NODE_ENV=production webpack)
@SwashbucklingwithCode3 жыл бұрын
That's interesting, I wonder what causes the differences I've heard of on Windows with ampersand usage.
@harshavardhannakkina18433 жыл бұрын
thank you so much, I had the same problem a few days go, what I did was 😂😂😂 create separate scripts like dev:window, dev:unix, etc..., it really got messy, and I had to update the readme file and the documentation. wish I had seen your video earlier
@SwashbucklingwithCode3 жыл бұрын
I've been in that situation when building Electron apps, and I don't fancy it again, haha. Good that you found a working temporary solution, though.
@mkbr-yt Жыл бұрын
OMG you saved me tons! Subscribed mate! Thanks
@mohsinmiya83333 жыл бұрын
hey man the fact that you made this video shows how great and how much you care bout this sort of thing. subbed and liked
@SwashbucklingwithCode3 жыл бұрын
Thank you for the kind words.
@medusaskull96252 жыл бұрын
Thanks for go extra miles to make this less painful. This is why the JS development community is mostly hated by me, they keep on introducing breaking changes that break all videos that I was trying to follow along.
@soumitralahiri1003 жыл бұрын
Thanks a lot for helping resolve this issue!
@Prashrey3 жыл бұрын
Great solution. Thanks!
@SwashbucklingwithCode3 жыл бұрын
No problem, twas my duty.
@mdhasiburrahmannafiz99843 жыл бұрын
it was life saving... thank you
@SwashbucklingwithCode3 жыл бұрын
nice!
@mdbicky94603 жыл бұрын
thanks a lot this is working perfectly
@myindustry64213 жыл бұрын
it's work...thanks dude
@brianhansen88762 жыл бұрын
Great little tip - but a BIG help!! Thanx!!
@mike_39792 жыл бұрын
Awesome !!!
@oniklegenda2320 Жыл бұрын
big thumb up for you!
@ptlh19693 жыл бұрын
Thanks man !
@SwashbucklingwithCode3 жыл бұрын
yup
@Korutz11 ай бұрын
Not all heroes wear capes. Some are just thoughtful about Windows users.
@timeforrice3 жыл бұрын
Thanks for this one
@xD-hu3gw3 жыл бұрын
ну проще добавить cross-env ) cool lesson
@cailyphuc5272 Жыл бұрын
Thank man!
@SwashbucklingwithCode Жыл бұрын
Yup!
@luisgerardogonzalezmorales26543 жыл бұрын
Super helpful
@L0r3nz0783 жыл бұрын
Thanks for this video. Could you please tell me which VSCode Theme and fonts for it and terminal are you using?
@SwashbucklingwithCode3 жыл бұрын
I have a video planned for covering some of my work setup, but for now: The theme is called Everset, it's one I created awhile back. The font is Cartograph Mono. I switch that every now and then. The terminal is Windows Terminal, which is pretty new and I use that for all my WSL stuff. I've customized it a little with my Everset colors.
@Rhodair3 жыл бұрын
I'm still new to NPM and cross-env seems like a great solution, but I'm totally confused on a part "cross-env" is being used in the production scripts but was added under devDependencies. Doesn't this mean it wouldn't be available in a Prod CI/CD? If installing under devDependencies, wouldn't it make sense to have Prod scripts omit it, and the Dev script using cross-env? (making prod mode the default, not dev)
@SwashbucklingwithCode3 жыл бұрын
This is a good question, and you'll get different opinions from different people. The main thing `devDependencies` vs `dependencies` does is tell a consumer of the package what to install. So if you are making a package for others to use and hosting it, your package.json tells them what sub dependencies are needed to be installed. Because of this, whether deps are dev or not for an "app" does not make a huge difference in many situations. I think to make intent clear, you might decide to omit `cross-env` from the production script since you know you'll be deploying to Ubuntu (or whatever Linux distro), for example. But in the end, your app is going to install all the packages when any server runs `npm i`.
@Rhodair3 жыл бұрын
@@SwashbucklingwithCode thanks so much for your time to help I hadn't published a package for others yet, so that's a big eye-opener for me to learn `devDependencies` & `dependencies` are just a distinction made by package consumers. I mistakenly assumed a CI/CD could reference package.json to only install `dependencies`. Because `npm i` always installs everything, it now makes sense why that `cross-env` command would work on either env. all the same - really more a dev/team preference. Thanks again; your 2-hr WebPack tutorial has helped me accelerate projects more than words can express!
@Rhodair3 жыл бұрын
After further digging, the method I finally settled on is the way shown on WebPack's Guides => Production page using webpack-merge to have a common config and child configs for each env.
@SwashbucklingwithCode3 жыл бұрын
@@Rhodair No problem, it's one of those things that isn't commonly explained that you pick up along the way after doing it a bunch.
@SwashbucklingwithCode3 жыл бұрын
@@Rhodair Cool, thanks for sharing and hope it works out well for ya.
@iamprincemuel3 жыл бұрын
SERVE=true does not work with build-dev on my machine. I receive this error 'SERVE' is not recognized as an internal or external command, operable program or batch file.
@SwashbucklingwithCode3 жыл бұрын
That is indeed what this video is about, however the `build-dev` command doesn't have `SERVE` in front of it in this project and video. So that's likely something you added yourself and needs the same treatment as `build` in this video with `cross-env` installed and put in front.
@LongNguyen-iz2vp2 жыл бұрын
Nice video
@SwashbucklingwithCode2 жыл бұрын
ty
@kevinmorte39593 жыл бұрын
Thanks!
@kgbbbbbbb63923 жыл бұрын
Thanks
@erykczajkowski82263 жыл бұрын
Thank you!
@chaitanyachirag37953 жыл бұрын
I did cross env thing but nothing happened
@rajashekhar4333 жыл бұрын
Sometimes build takes long time so how can we fix or any sugesstions. Thank you!!!!
@SwashbucklingwithCode3 жыл бұрын
I have no idea what this is in reference to. Build times just in general?
@rajashekhar4333 жыл бұрын
@@SwashbucklingwithCode means sometimes it takes 45m to build 2. First load size is 431kb so any sigguestions Thanks for the reply
@SwashbucklingwithCode3 жыл бұрын
@@rajashekhar433 Sorry, this doesn't help me answer at all. I don't know what project you are working on, how much code is involved, what's being parsed, or any of the necessary details to even guess at that. I can say that it does not sound normal at all to have build times over a couple minutes for even decent sized projects, in my experience.
@mayurghuge8846 Жыл бұрын
Thank you.
@mohamedyoussef88353 жыл бұрын
Awesome Video ++++++++++++++
@codisy3 жыл бұрын
Nice subtitles..... KZbin detected Vietnam language and auto translate not work. I'am broken
@md.rakibuddinrana37653 жыл бұрын
thank you brother
@SwashbucklingwithCode3 жыл бұрын
Glad to have helped.
@chowdeswararao48493 жыл бұрын
thanks a lot
@nachoramirez41562 жыл бұрын
ty man
@notsure81753 жыл бұрын
tnx
@roberttramy97762 жыл бұрын
you looklike Jesus to save everybody from this kind of env problem thank u 👍🏻
@oc5yn2 жыл бұрын
your like 5 indian programers in 1, goddd
@MrLion223 жыл бұрын
That does not work under Windows. Before you meet a statement, you should test it before !!!
@SwashbucklingwithCode3 жыл бұрын
That's an interesting take, considering this video shows me doing it on Windows.
@MrLion223 жыл бұрын
@@SwashbucklingwithCode Then you have to hide something from us. Because I have just praised it 1:1 and use the same editor. The only difference is that I use the latest version of all. Here in the video your versions are a bit outdated. But it is funny that it does not work for me
@SwashbucklingwithCode3 жыл бұрын
@@MrLion22 That could be, but then how would it work for the other people that have commented on the video? It's possible there is an incompatibility between our setups, and it's also really common that people miss a step when following videos. Only time will tell on that 2nd one.
@MrLion223 жыл бұрын
@@SwashbucklingwithCode The comments here are older than my comment. Therefore, it is irrelevant ... added that it seems to work for some it and do not. You should not exclude it from the comments. Fact is that it definitely does not work for me. I wanted to post screenshots here, then I could have showed you.