From Create-React-App to Vite in 10 seconds

preview_player
Показать описание
You're still on CRA + Webpack? You shouldn't: "nx init" and before you know it you have a modern setup with React and Vite 🔥

▬▬▬▬▬▬ 🔗 Links ▬▬▬▬▬▬

▬▬▬▬▬▬ 🐦 Socials ▬▬▬▬▬▬
Рекомендации по теме
Комментарии
Автор

Hi, you forgot to mention that process.env probably will not work anymore (at my app) and that your .env vars probably should start with VITE so:

process.env.REACT_APP_VAR -> import.meta.env.VITE_VAR

Might be a react version thing, the import.meta.env thing but I'm probably not the only one who runs into this.

RM-zjzb
Автор

I really love this concept! Is it also applicable to a Nest application? I'm thinking of doing a TS monorepo and I know Nest uses Webpack and wondered if Vite could substitute.

this.just.in.
Автор

Incredibly misleading, it didn't even carry over any dependencies, it's just a cookie cutter package.json file

XxMVPxDawg
Автор

How will apps have access to environment variables with Vite? import.meta.env?

RuslanGonzalez-oxvz
Автор

hi ihave a qustion so this method could help me to add vite to my existing Nextjs Project? can someone responde

binews
Автор

Is it recommended to use nx? Why not to use just vite ?

NicolasLucero