Hacker News new | ask | show | jobs
by mrgalaxy 1704 days ago
Anyone here switch from Webpack to Parcel? Or, look into switching and decided not to?

I recently upgraded Webpack from 4 to 5 and briefly looked for alternatives, but ultimately just decided to stick with Webpack since it works for us.

6 comments

I switched from Parcel (v1; had trouble upgrading) to esbuild for my web game, and it's been much simpler. And faster, obviously.

If you don't care about having a large plug-in ecosystem, or things like image optimization being handled directly by your bundler (and other stuff, from scanning the linked article), I'd say just go with esbuild

esbuild definitely caught my eye. I'm now noticing they support CSS and static files, which I guess I didn't realize. Is it easy to setup and configure? Because that is the one part of Webpack I cannot stand.
esbuild is not really configuration based like webpack. It takes some config options but you either specify them via the command line or write your own script to build up the config object. (they have a js and go api).

It's so much nicer to use than all the other bundlers.

EDIT:

To clarify, the dev experience is:

- You start with just the basic bundler with simple options you specify on the command line or maybe in a shell script.

- Then you want to do a few more things, so you turn the shell script into a nodejs script (or a Go program).

- You get to make the build script as simple or complex as you want. To your own discretion and to fit your use case.

The documentation is top notch. I was able to learn it and switch over to it in about an hour or two for a moderately complex codebase targeting both Node and the web, and using Workers and some code splitting.
ESBuild is very unopinionated and mostly just does the right thing. Some config is available for mundane stuff. The rest it defers to plugins, rather than config. That’s where you have N+1 problems however.
If you and your team know Webpack and the ecosystem of plugins well already, then stick with that. Setting up a new project does not take a lot of time for you I guess. Someone mentioned "webpack tax" when using Parcel, it is real. Parcel is nice, I like it, but you get more control with Webpack.
This was true in Parcel 1, but v2’s plugin system is just as powerful as webpack’s. v2 is all about adding extensibility and control.
I also switched to Parcel. My use case was such that Parcel was a faster and simpler choice. That being said, I am starting to look at esbuild, in the hopes of making builds even simpler.
Parcel definitely looks simpler than Webpack. Of course Webpack tries to advertise itself that way, but it's never the case.
Moved from webpack to esbuild + postcss. Forced us to reduce our dependencies, and it also improved our iteration speed. Of course that comes with dropping the need for core-js and focusing on evergreen browsers that esbuild targets.
I switched to Snowpack for a small project (TS+Preact), reasonably straightforward and strong recommendation. Would not consider Parcel, seems like a step backwards in performance.
I am just using parcel for my small projects because it is simple. It is actually zero configuration. Setting it up takes about 1 minute.