Тёмный

Converting to Vite from Create React App - lower your boot time to almost nothing! 

Ian Lenehan
Подписаться 3,1 тыс.
Просмотров 18 тыс.
50% 1

Why Vite: • Vite vs Create React A...
Written tutorials I used:
craftsmenltd.com/blog/2022/06...
www.darraghoriordan.com/2021/...

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

 

27 авг 2022

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@sunilshah300
@sunilshah300 Год назад
This guy is a gem, not every one shows the process of debugging and googling, but showing the process is truly splendid.
@makinopvp
@makinopvp Год назад
thank you very much homelander, you saved my project
@Doothacvter144
@Doothacvter144 Год назад
ahahah, thought the same
@c_span
@c_span Год назад
🤣🤣🤣🤣🤣
@o.ifeoluwa7176
@o.ifeoluwa7176 Год назад
😂
@IanLenehan
@IanLenehan Год назад
Hahaha I hope I don't come across as a psychopath like him!
@chizidotdev
@chizidotdev Год назад
Just needed to see what I’d have to go through before I propose this to the team… Lot of work😅
@IanLenehan
@IanLenehan Год назад
Haha yeah. I looked at doing this at work and with a much more complex app. Too hard!
@acidhauss7018
@acidhauss7018 Год назад
@@IanLenehan I was trying to get storybook to run on it and its a right pain in the ass - would not recommend and gave up in the end. I'm sure I will stubbornly continue to try and fail over the next few weeks for the challenge...
@AbdoTech0
@AbdoTech0 Год назад
Keep up the good work 🔥
@IanLenehan
@IanLenehan Год назад
Thanks, will do!
@3491da
@3491da Год назад
Oddly enough i actually enjoyed watching the debugging 😄
@IanLenehan
@IanLenehan Год назад
Haha I understand the satisfaction
@Luka-qm1ri
@Luka-qm1ri 8 месяцев назад
You look like the Homelander from The Boys from this angle at 1:00 hahah
@tech4tech966
@tech4tech966 Год назад
Thanks 😍
@codeNinja2320
@codeNinja2320 Год назад
Thanks ❤
@josecastaneda8082
@josecastaneda8082 4 месяца назад
This video really shows realistically how this process may look like. I just did a migration of CRA with typescript and it was not without some headaches. But worst of all was migrating jest tests to Vitest. I have 500+ tests in my solution. That took a couple of days of googling, rewriting and cursing. You can count on that you’ll need to rewrite some, as mocks behaves differently in vitest compared to jest, for example. Another one is different names on requireActual and jest.fn now being vi.fn etc. While it is faster with Vite and Vitest, you’ll notice that it is still not as mature as CRA, there is just less information to google about compared to CRA and Vite has its issues as well. I guess that it will get there eventually.
@CadisDiEtrama000
@CadisDiEtrama000 5 месяцев назад
For anyone facing this problem, I found most success just initializing a new Vite app, then just copy-pasting all the old files inside... Then you just need to adapt some of the config, App.tsx file, and you are basically done 👍
@adventurer2395
@adventurer2395 4 месяца назад
that’ll cause you to lose version history
@hamzakyamanywa9792
@hamzakyamanywa9792 Год назад
Loved it 😅
@IanLenehan
@IanLenehan Год назад
Thank you!
@hamdiaminehkh
@hamdiaminehkh 5 месяцев назад
I went through the same process and the same steps; for 2 hours or more, I found myself changing imports, altering extensions, adjusting configurations, and so on without success. Eventually, I was compelled to cancel everything and revert to the React script. However, after watching this video, I feel encouraged to give the migration to Vite another try.
@dekafmusic
@dekafmusic 14 дней назад
how did it go?
@kartikgupta9407
@kartikgupta9407 Год назад
Thanks it helped
@IanLenehan
@IanLenehan Год назад
I have a friend called Kartik Gupta, don't suppose that's you??
@mohitspg
@mohitspg Год назад
I have done migrations but hot reload "HMR" is not working, any fixes for that issue?
@alibarznji2000
@alibarznji2000 2 месяца назад
Hey, did you fix the CSS issue?
@thebuddy.8765
@thebuddy.8765 Год назад
how to config tailwind and antd on vite? i followed ure steps, it's work but my css not working. vite showing @import must precede all other statements error.. how to fix these css errors..
@IanLenehan
@IanLenehan Год назад
Sorry it's a bit hard to debug this way but hopefully you can google the error message or find help on stack overflow or something like that!
@kennedydre8074
@kennedydre8074 Год назад
Have they resolved the issues with vite not showing the error messages
@IanLenehan
@IanLenehan Год назад
I didn't know about this. Which error messages?
@kennedydre8074
@kennedydre8074 Год назад
@@IanLenehan vite doesn’t show error messages on the browser like create-react-app. When you encounter an error, all you get is a blank screen and the guessing game begins
@Ree-rr1js
@Ree-rr1js Год назад
@@kennedydre8074 usually they show you the error on your browser console.
@bigyanpatel7049
@bigyanpatel7049 Год назад
you need to configure eslint for vite to show those errors.
@luisbrazilva
@luisbrazilva Год назад
I get it. It's fast but why is everyone ignoring the huge security risk of exposing your API connections and key because it serves the JSX files in the network activity tab without masking them or encoding them.
@IanLenehan
@IanLenehan Год назад
Hey Luis - interesting, do you have a link to somewhere that explains this? I am not aware of a risk with it
@luisbrazilva
@luisbrazilva Год назад
@@IanLenehan By the way, I do love your work.
@luisbrazilva
@luisbrazilva Год назад
@@IanLenehan I retract my comment. I did a quick deploy to Netlify to make sure and it wasn't exposing the API. I made a mistake in my migration and forced the PROD: true in the import.meta.env Object.
Далее
How to build elegant React forms with React Hook Form
22:34
Create react projects
22:33
Просмотров 36 тыс.
7 better ways to create a React app
7:08
Просмотров 524 тыс.
Refactoring smelly old React code!
25:29
Просмотров 2,9 тыс.
Why is Everyone Using Vite?
7:34
Просмотров 75 тыс.
Vite is The New Webpack and Create-React-App killer!
18:06
10 React Antipatterns to Avoid - Code This, Not That!
8:55