News for hackers. Stuff that matters.
Re:Vite 3.0 by _fat_santa on Wednesday July 13, 2022 @12:13PM (#32084722)
> Has Webpack really been dethroned as the go-to bundler?

At this point yes. I'm sure there are still some things that you will need Webpack for, but in my experience I have yet to find one of those instances. Vite is not just way way way faster than Webpack, it's also way simpler.

Configuring a React project from scratch with Webpack is an undertaking, especially if you're not seasoned with Webpack configurations. Vite on the other hand is super simple to setup, I typically don't even reach for the starters that vite offers because it's just as easy to do an `npm init -y` and then install it manually.

I work for a web dev agency and we have migrated all of our existing projects to Vite, and advised any new projects to not use Webpack unless there is a very specific reason and other solutions have been exhausted.

Re:Vite 3.0 by 5e92cb50239222b on Wednesday July 13, 2022 @01:49PM (#32086232)
> Configuring a React project from scratch with Webpack

Why do people do this? I've always used the official way (CRA), and never had any issues with it. If you need to adjust webpack configuration, there are third-party packages that work very well in practice (like craco). Yet reinventing the wheel over and over again seems to be popular.

https://create-react-app.dev/docs/getting-started

Re:Vite 3.0 by SlackingOff123 on Thursday July 14, 2022 @09:26AM (#32095800)
The user you replied to gave a reason already:

> Vite is not just way way way faster than Webpack, it's also way simpler.

It's not reinventing the wheel. It's just significantly improving the wheel.

Re:Vite 3.0 by 5e92cb50239222b on Thursday July 14, 2022 @10:34AM (#32096557)
You're answering a question I didn't ask (see the first quoted line). I'm interested in why would anyone waste their time on what's already been done (namely, re-implementing create-react-app from scratch).
Re:Vite 3.0 by _fat_santa on Thursday July 14, 2022 @11:35AM (#32097389)
I'm not a huge fan of these "managed" frameworks, especially for a larger app. The reason I set things up from scratch is there is alway a fear that in the future a migration away from <MANAGED_FRAMEWORK> will be required for some reason and the effort will be much greater than if we had set it up custom from the getgo.
Re:Vite 3.0 by FinalBriefing on Wednesday July 13, 2022 @12:30PM (#32084965)
Nice! Each time I tried out a new bundler (Parcel comes to mind), we hit issues where their configuration hasn't been sufficient for some niche stuff I learned to expect Webpack to handle. I can't think of any specific examples, but I'm sure you've seen something similar.

Vite has been great in the vanilla and Vue projects I've used it for. I didn't think the speed bump would be as noticeable as it was. I'm really happy to hear it is getting more usage in frameworks like Laravel.