Hacker News new | ask | show | jobs
by bladegash 1452 days ago
Really enjoy working with Vite and it works great with React (many think it’s geared towards Vue, which perhaps it was at one point).

Made the switch after some frustrating behavior coming from CRA and having zero flexibility with configuration.

As a side note, Vitest is fantastic as well and I highly recommend giving it a try.

3 comments

Last year, I converted a CRA to Vite because CRA wouldn't work in a monorepo. It was such a painless experience and it just worked.
Yep, same! I will say, getting everything playing nicely in terms of TypeScript, ESM, CJS, etc. was a bit challenging on the first go around, but isn’t the fault of Vite (at least not entirely).

As an example, if you’re used to CRA being setup for you to handle things like images/fonts, you’ll probably need a loader (same as webpack). Then you might need type definitions for the loader, the file format (e.g., SVGs), etc.

After getting past the initial configuration hump it’s not bad and pretty painless to start a new project.

I just don’t want to mislead people into thinking it’s entirely painless.

Exactly same here. Scaffolded a small project with Create React App. At one point tried to organize all the config files in a subfolder and ran into the problem of CRA literally hardcoding the location. Was annoyed enough to look at alternatives and Vite was a fantastic substitute that not only provided all the configurability I wanted, but also let me remove all kinds of craft from the project (eg random React and ASP.NET proxy files generated by CRA). It was also fast and way leaner than CRA in terms of dependencies. Quite happy with the outcome.
Indeed, it never occurred to me to use it with react. Vue vitesse (vite + project template) was so nice it stopped my quest.
And it’s from the guy who built Vue - maybe try that out too? You’d be surprised to get the same feeling there :-)
Not who you responded to, but trust me, I would if I could still use Vue professionally to where I could justify the time in my work and/or personal projects.

I was a huge fan of Vue 2 and Nuxt, but the work world has been heavily favoring React for a while now.

Not that everything has to be about work, but just haven’t mastered React enough to personally justify the time spent on working with Vue 3.