Has Webpack really been dethroned as the go-to bundler?
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.
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.
> 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.
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.
[0] https://laravel-news.com/vite-is-the-default-frontend-asset-...
I think building js in js is just not fast enough anymore, everyone is moving towards compiled languages for building their apps. The next winner in the space will be something like vite that uses a compiled language under the hood (vite uses esbuild, which is written in Go).
The move to 3->4 was painful as 25% of my projects started to move to 4 and no longer worked with 3. So I was stuck with some legacy packages during a time I was upgrading from Vue 2 -> 3. AFAIK they Rails didn't even get to Webpack 5 in practice by the time I left.
Vite came to the rescue at a perfect time.
I've been experimenting with some stuff using esbuild directly in a "targeted" way that builds only a few things with most stuff just Typescript transpilation only (again). I've almost got a feeling the next winner may just be Typescript+esbuild, but not at all because esbuild is fast or written in Go. It may still be Typescript+rollup, given the hints of what's coming in the next Rollup major. (Typescript is still in JS and getting faster every release, with incremental build support for large projects getting better all the time. Rollup is still in JS and still a decent esbuild competitor.) In a "no build"/"targeted build" world it's not really speed that matters but a minimal, targeted API that's easy to automate as you choose targets to build and it may be the case that the time of the "kitchen sink plus a million plugins" builder is over.
Otherwise I've been using Parcel without much issues with quite less configuration.