Hacker News new | ask | show | jobs
by cprecioso 3129 days ago
Why does it have both webpack and rollup? Can't they both be configured to do the same thing? Why the duplication?
2 comments

Yes they can. I can't speak for the offer, but I've used both in some testing/research environments.

It's worth noting that they way Webpack will parse classes with any "standard" build process will corrupt WebComponents custom element constructors. Rollup performs well here.

Of course maybe there's a more enlightened method to work with Webpack and WebComponents, but I don't know it.

So I have included both in one of my project-init scripts to run back-and-forth tests and see which performs better for the feature at hand. It's then pretty easy to remove one as a dependency once decided.

They both have different use-cases. Webpack makes more sense on the front-end for bundling web apps but it sucks for bundling libraries.
so you can choose which one you want. I use both. Webpack is great for front-end apps. Rollup is way better for bundling libraries.