Тёмный

Vite Crash Course | Faster Alternative To CRA 

Traversy Media
Подписаться 2,2 млн
Просмотров 186 тыс.
50% 1

In this video, we will talk about the Vite JavaScript build tool. We will also compare it to Webpack as well as Create React App.
💻 Blog Post:
www.traversymedia.com/blog/vi...
⭐ All Courses:
traversymedia.com
💖 Show Support
Patreon: / traversymedia
PayPal: paypal.me/traversymedia
👇 Follow Traversy Media On Social Media:
Twitter: / traversymedia
Instagram: / traversymedia
Linkedin: / bradtraversy
Timestamps:
0:00 - Intro
1:13 - Vite vs Traditional Module Bundlers
3:50 - Vite vs Create React App
7:14 - Setting Up a Project
8:21 - File & Folder Structure
11:27 - Creating a React Component
12:23 - Environment Variables
13:50 - Using Sass
14:50 - Build For Production & Preview
15:19 - Plugins

Наука

Опубликовано:

 

15 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 145   
@bryan6090
@bryan6090 Год назад
HOW this is the third time I needed to learn a particular language quick and when I get ready to study it, you've released a video
@TraversyMedia
@TraversyMedia Год назад
Magic 🪄
@ZaidMarrie
@ZaidMarrie Год назад
I just got started with Vite today, and I just got a notification for this vid. It is magical lol.
@LtdJorge
@LtdJorge Год назад
Always happened to me, a couple years back
@aritramukherjee
@aritramukherjee Год назад
💯 exactly same for me
@hasithadhananjaya2806
@hasithadhananjaya2806 Год назад
​@@TraversyMedia what's the npm i command usage in this video please describe it little more.
@anonymousontheinternet4486
@anonymousontheinternet4486 Год назад
Just got started with Vite. Wanted a really quick intro so I could jump into it and not have to waste time watching a 2hr tutorial. This was perfect. Anything I need, I'll learn on the way.
@RustyNox
@RustyNox Год назад
Hey Brad, this was really useful to me, thank you for the long-form content on Vite, super clear explanation, love your style!
@haciendadad
@haciendadad Год назад
Thanks Brad! A replacement for CRA has been a long overdue! Vite looks really cool and excited to use it; starting today.
@isaacqadri
@isaacqadri Год назад
The future of frontend tooling is here, thank you Brad.
@anshuraj5734
@anshuraj5734 25 дней назад
Anything taught by you simply gets into my head in a go. Thanks for such crystal clear lectures.
@padeen2683
@padeen2683 Год назад
Exactly at the moment when I wanted to search for "vite tutorial" this showed up. Great timing!
@voidmind
@voidmind Год назад
The developer experience is so much better! No more having to wait for the code to rebuild, and often you won't have to reload the whole component tree
@rafaelalstent4974
@rafaelalstent4974 Год назад
Thank you so much for making a informative video about a good replacement for CRA. The video is great, we have the theory and the practice. Couldnt ask for more. Thank you c:
@Salah-YT
@Salah-YT Год назад
thank u so much Mr Brad it was an amazing video about Vite Thank u so much, and I did %50 the javascript course on ur website so I love it thank u so much for all staff
@rangabharath4253
@rangabharath4253 Год назад
Awesome as always Brad. Thanks 😊
@walidbelfatmi9333
@walidbelfatmi9333 Год назад
As expected of Brad, the best explanation. Thank u !
@setfbiker
@setfbiker Год назад
It always feels special when I see a notif about a new video from you.
@Ryguy12543
@Ryguy12543 5 месяцев назад
excellent tutorial, I followed along without a single issue. thank you so much.
@krupeshanadkat635
@krupeshanadkat635 Год назад
You just made my life so cheerful ❤ I was in little panic when i heard new react docs got rid of cra & now they have mentioned to use next js by default. CRA official github repository also seems inactive. I did not want to learn Next js right now, but would still love to enjoy react on new projects without setting up things manually. This video really gave me confidence back.
@marcioandre6469
@marcioandre6469 Год назад
🤣🤣Same here
@saranghae3720
@saranghae3720 Год назад
Love the way, how you present things....
@daydreamical
@daydreamical Год назад
Thank you so much for this video, was very useful, definitely learned a lot! Thanks!
@akashddeepchitransh4537
@akashddeepchitransh4537 Год назад
Amazing video, exactly what I needed.
@raekwonthachef
@raekwonthachef Год назад
Amazing video Brad! so succinct :)
@estherinyang4779
@estherinyang4779 7 месяцев назад
I wish I could like this a million times. Thank you so much!
@samuelnkrumahbonsu7210
@samuelnkrumahbonsu7210 Год назад
Thanks for doing staff like this vitejs for some of us. Appreciate that a lot. Am learning bro. Thanks
@user-jv6xc9sl3l
@user-jv6xc9sl3l Год назад
Ive been waiting for this!
@NotesNNotes
@NotesNNotes Год назад
I LOVE VITE
@rod6722
@rod6722 Год назад
Sweet! I just started using it.
@ward7576
@ward7576 9 месяцев назад
I am glad I found this clip. I actually didn't enjoy Vite at first. Felt confusing... you know why? With webpack and other solutions got used to the fact that I have to define paths to bundle-able assets, a lot of other boilerplate config beforehand, specific production config and optimizations that you have to set up - I was looking for that in Vite and got super confused when I found nothing like it. This has been the best switch I have done in build tools, ever.
@arianh
@arianh Год назад
It was a great video in order to get our hands dirty using Vite 👏🏻💯
@brianressler569
@brianressler569 Месяц назад
I needed something that I could use to quickly build out a concept without all the bells and whistles of nextjs and I ran into Vite. This video was godsend. I was kind of overthinking it since I am also still learning some React and WebPack fundamentals in the background. After watching your video, I am realizing how simple getting a Vite project up and running is and I can still finish learning react since nothing is syntactically different at least as of now.
@SameeraSenarathna
@SameeraSenarathna Год назад
Really helpful content. Thank You.
@yahayaoyinkansola8258
@yahayaoyinkansola8258 9 месяцев назад
Vite is really cool, i love the way it is so lightweight, giving the developer more control, and making the dev experience more enjoyable
@Ryan-Phillips2.0
@Ryan-Phillips2.0 Год назад
Would be nice with more Vite tutorials. Like setting up navbar and routing.
@wwhill8033
@wwhill8033 Год назад
Excellent stuff, thanks😊
@omomer3506
@omomer3506 Год назад
Excited to learn about vite
@naveenbelandur9952
@naveenbelandur9952 Год назад
Thanks a lot, traversy media, for this
@Samuels691
@Samuels691 7 месяцев назад
I enjoyed this! Thanks
@marouabenali1321
@marouabenali1321 5 месяцев назад
Thank you, it was very helpful
@code_with_sheynet
@code_with_sheynet Год назад
Thanks very much my mentor
@hassaneoutouaya
@hassaneoutouaya 7 месяцев назад
Thank you so much !
@otmanm4095
@otmanm4095 11 месяцев назад
Brad never disappoint
@naturecultureafrica
@naturecultureafrica Год назад
Great ! Simple and clear ~ Next time, could you do the same but including, nextjs, node and Mongo DB?
@lauralong3091
@lauralong3091 2 месяца назад
i love these videos.
@hip04hop85
@hip04hop85 Год назад
Right on time!
@khandoor7228
@khandoor7228 Год назад
Thanks Brad!
@kelvinmacharia3715
@kelvinmacharia3715 Месяц назад
Wow! Greate resource ever
@sanjaybatak3549
@sanjaybatak3549 Год назад
Did Brad just upload a Crash Course from his hotel room? lol 😂 Thanks Brad. Keep up the good work!!
@marouaniAymen
@marouaniAymen Год назад
Thanks for the video, but it'd be better if it shows how to configure ESLint and add rules to the project and also how to add settings for unit tests (vitest or react-testing-library).
@abdellahdamri656
@abdellahdamri656 Год назад
Hi brad Great Stuff! I just been wandering could we use it to build our own Frontend Framework?
@anthonysmith7913
@anthonysmith7913 Год назад
Thanks a lot!
@sasabaid
@sasabaid Год назад
@TraversyMedia Loved the video. Can you also share the extensions u used for those autocomplete of imports, vite configs on ur vscode
@thusithanjana
@thusithanjana Год назад
Thanks!
@faizanahmad9850
@faizanahmad9850 Год назад
Thank u Brad
@CandidoZfinda
@CandidoZfinda 4 месяца назад
Very good
@mahmodsamir5110
@mahmodsamir5110 10 дней назад
excellent
@warisaremou8754
@warisaremou8754 Год назад
Thanks for the video 😀🙏 How can I update vite version in an existing vite-react app Also can we have ( maybe later ) a video on how to set up pwa with vite-react app ? 🙏
@elhaambasheerch7058
@elhaambasheerch7058 Год назад
"Through out this video It might seem like I'm bashing CRA but actually I'm just talking about vite", COLD.
@alexanderkomanov4151
@alexanderkomanov4151 Год назад
Cool!
@Uthalerebaba-nr4qi
@Uthalerebaba-nr4qi 10 месяцев назад
- [00:00](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 🎥 This video is a Vite crash course, covering its benefits and how it compares to traditional build tools like webpack. - [01:20](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 🧩 Webpack is a traditional module bundler that bundles development source code into a single JavaScript file for production use. - [02:44](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 🚀 Vite, unlike webpack, leverages native ES modules in modern browsers for faster development, avoiding repetitive bundling during code changes. - [03:38](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 📦 Vite uses Rollup for production bundling, making it a fast alternative for development compared to webpack or parcel. - [04:20](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 💡 Vite is gaining popularity as an alternative to create-react-app, offering speed advantages for front-end development. - [07:02](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 🛠 Setting up a Vite project is easy using a simple command like `npm create @latest`. You can choose different templates and frameworks like React or Vue. - [08:24](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 📄 Vite project structure is lightweight and simple, with a minimalistic `package.json` and straightforward configuration. - [12:24](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) ♻ Vite offers Hot Module Replacement (HMR), allowing changes in code to be reflected immediately without requiring a full rebuild. - [13:49](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 🔧 You can easily set up environment variables like API URLs in a Vite project. - [14:07](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 🎨 Vite supports SCSS out of the box, making it simple to add and use CSS preprocessors in your project. - [15:05](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 🏗 Building a Vite project for production is straightforward with the `npm run build` command, and you can preview the production build with `npm run preview`. - [16:10](ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-89NJdbYTgJ8.html) 📚 Vite offers official and community plugins that extend its functionality, allowing for integration with various tools, libraries, and frameworks.
@faruqoloyede9772
@faruqoloyede9772 Год назад
Wow just saw an article about this vite
@evansatompoya7351
@evansatompoya7351 Год назад
For the environment variables section, when you run tests on your react application, you get cannot use import.meta outside a module even though I define type="module" in my package.json. so what I did was, reversed engineered vite to use the process keyword instead of import.meta. so I can now do something like process.env.API_URL. But the issue with the process keyword is that, in production, I get process is not defined since the process keyword is not accessible in browser environments. How do I get around this
@warrenmcinnes987
@warrenmcinnes987 Год назад
Hi Brad. How did your VS code auto-suggest @12:01? Was it co-pilot?
@WrestlingTournamentsDotCom
@WrestlingTournamentsDotCom 11 месяцев назад
Vite is awesome. Our build time got so much faster when we switched to it from webpack. Until this video, I've pronounced it to rhyme with "byte", whoops.
@sicfxmusic
@sicfxmusic 6 месяцев назад
More like wheat than white 😉
@Ahmed-fq3kz
@Ahmed-fq3kz Год назад
thanks man
@user-zr7ve3ut5t
@user-zr7ve3ut5t Год назад
When working with huge scss files, vite can also get fairly slow. It even crashes sometimes.
@mahad7966
@mahad7966 Год назад
Try tailwind instead.
@user-kn7tc3pp2c
@user-kn7tc3pp2c Год назад
The idea isn't about getting slow, but taking too much resources. for someone like me just started and not having the best laptop or computer tool like create-react-app is really heavy on my machine and take a lot of resources ram, cpu, ... to run, so the idea is simplicity and using resources as minimum as possible
@abhinavv_sharmaa
@abhinavv_sharmaa Год назад
What's the theme you are using in the VS code?
@NiPSpawN
@NiPSpawN 2 месяца назад
Hi, how are called the theme you used in that video? Also what extension you use for vs code?
@kelvinmacharia3715
@kelvinmacharia3715 Месяц назад
Follow up on create a react app with Vite. Do you use npm init vite@latest my-project or npm create vite@latest my-project?
@jediampm
@jediampm Год назад
Hi, make a video on your thoughts about the new react docs and the fact they recommend nextjs and others related frameworks. Is this good for beginners?
@gururajmoger8649
@gururajmoger8649 Год назад
Pls do it for angular projects also 👍
@tigrafale4610
@tigrafale4610 Год назад
Cheers
@chesterxp508
@chesterxp508 4 месяца назад
GoodJob!
@user-iz8xn5mh1j
@user-iz8xn5mh1j 6 месяцев назад
It could have been fantastic if you had incorporated testing with Vite as well.
@DragonFruit9k
@DragonFruit9k Год назад
Hi, how can we setup testing library and jest, or is there better solution for testing?
@afgone123456
@afgone123456 Год назад
What theme do you use for vsc?
@ScriptRaccoon
@ScriptRaccoon Год назад
3:21 I think this is not correct. esbuild is not used to serve ES Modules. As you say in the video, this is what the browser just does for us. esbuild is a module bundler. It is used to pre-bundle depencencies, and also when you run build the Vite application.
@faizanahmad9850
@faizanahmad9850 Год назад
Hi, Brad I have enrolled in your MERN stack app course in udemy should I continue with same. Or it will get updated
@Seacrest.
@Seacrest. 9 дней назад
I'm trying to bind nextjs landing page with client react app which uses vite but how can I define base: /lang/path as dynamic path to connect both apps? Is base static only because of linking assets?
@code_with_sheynet
@code_with_sheynet Год назад
You give me Hope that i will be great in Tech space
@TraversyMedia
@TraversyMedia Год назад
If I can, you can. As long as you have the drive 💪
@code_with_sheynet
@code_with_sheynet Год назад
I have been learning DevOps this year, But my learning roadmap is getting distracted. What can i control that Brad? Please do a tutorial series on DevOps using Docker.
@code_with_sheynet
@code_with_sheynet Год назад
​@@TraversyMedia I have been learning DevOps this year, But my learning roadmap is getting distracted. How can i control that Brad? Please do a tutorial series on DevOps using Docker.
@tanmaypanadi1414
@tanmaypanadi1414 Год назад
you can look at books and content from Tech world with Nana and Jeff geerling they have some awesome tutorials on RU-vid.
@hugo-abdou
@hugo-abdou Год назад
is this the introduction of the course or this is the course i was excpecting more lool
@paulthomas1052
@paulthomas1052 Год назад
Thanks - great demo.
@pav2k
@pav2k Год назад
Please make Solidity crash course!
@Cod3rMax
@Cod3rMax 6 месяцев назад
What are the icons you are using and theme?
@arthurhakobyan7343
@arthurhakobyan7343 Год назад
what is the name of the vs code theme and the icon pack that you are using ?? thanks )))
@xcrxwadda8287
@xcrxwadda8287 Год назад
I was using CRA, but lately am using Vite it's fast and never looking back
@QueeeeenZ
@QueeeeenZ Год назад
I love Vite, its like million times faster than Webpack
@abukhalidrifat3994
@abukhalidrifat3994 Год назад
I am getting an error while choosing react with JavaScript and swc. The error says "[vite] Internal server error: Bindings not found"
@DeoMaido
@DeoMaido Год назад
Videos have worked for me but how can I make my website fix on small device's
@Virtualexist
@Virtualexist Год назад
Hi people! I am completely new to learning react, I bought a udemy course, and they are teaching with CRA, should I continue or shift to VITE? I do not have enough information to make a decision, lemme know? plesss.
@ThomasProsserZurich
@ThomasProsserZurich Год назад
Thanks for this! I like vite precisely for its quickness. The only reason it took me so long to switch over: Dang they need a different logo! This one is just ugly.
@crizwiz489
@crizwiz489 Год назад
Can you please create a crash course on react with typescript
@labialkosta261
@labialkosta261 Год назад
Hey Brad !! thanks for Uploading, i have a question for you or the audience here, everytime i hear about upgrading a software or a website, they say it's need funding wich mean money, so how upgrading software or a website need money, it's just coding that all. because i recently heard about twitter and he will be upgrading his source code and they say that it's will take a lot of money. So any explanation please ?
@TraversyMedia
@TraversyMedia Год назад
There are many areas of cost. Developers, project managers, marketers, infrastructure. As applications grow, so do the technology demands.
@badziobw
@badziobw Год назад
Someone has to design this code and someone has to write it, thats the biggest chunk of cost. Im sure you don't do your work for free either?
@labialkosta261
@labialkosta261 Год назад
@@badziobw i understand thanks but i talking about upgrading with existing workers, but you already have answered the questions thanks a lot
@labialkosta261
@labialkosta261 Год назад
@@TraversyMedia thanks brad for the information ℹ
@tanmaypanadi1414
@tanmaypanadi1414 Год назад
As I understand during upgrades there is high possibility of broken code base, bugs , while the existing code is tested and proven to stand the test of time.
@omomer3506
@omomer3506 Год назад
So does that mean you can't use vite with certain older browsers
@aaliraza4004
@aaliraza4004 Год назад
hi, how we use Context API in Vite thankyou ...
@mdkawsarislamyeasin4040
@mdkawsarislamyeasin4040 Год назад
Kindly create a video about how to configure vite
@techiesakar
@techiesakar 8 месяцев назад
Why npm run preview shows blank white page ?
@vibhavvolvoikar901
@vibhavvolvoikar901 Год назад
Sir please make one video on Pinia
@PuRpLeIzLeGiTx
@PuRpLeIzLeGiTx Год назад
🎉
@jopadjr
@jopadjr Год назад
2.2k+...Thanks
@omojjegomosc8211
@omojjegomosc8211 Год назад
Vite is showing a blank page after using routing, anyone has the same problem?
@Randomguy48279xyz
@Randomguy48279xyz Год назад
👍
@warpmaster7
@warpmaster7 Год назад
will vite work with certain backends like django?
@LtdJorge
@LtdJorge Год назад
You mean for the frontend side?
Далее
Why is Everyone Using Vite?
7:34
Просмотров 74 тыс.
Learn Vite with Evan You
13:35
Просмотров 258 тыс.
F# in 100 Seconds
1:27
Просмотров 232
The Importance of Specialization in Coding
7:13
Просмотров 174 тыс.
Learn React With This One Project
42:38
Просмотров 698 тыс.
Git MERGE vs REBASE
16:12
Просмотров 1 млн
Every React Concept Explained in 12 Minutes
11:53
Просмотров 395 тыс.
How to make your JavaScript Bundle Smaller
2:49
Просмотров 136 тыс.
Ноутбук без экрана
0:22
Просмотров 16 тыс.
Will the battery emit smoke if it rotates rapidly?
0:11