Hacker News new | ask | show | jobs
by antjanus 3129 days ago
I built a similar starter kit that inludes both Webpack and Rollup. https://github.com/asteridux/asteridux it's definitely much simpler and bare-bones so it might not be for everyone.
2 comments

Why does it have both webpack and rollup? Can't they both be configured to do the same thing? Why the duplication?
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.
It would be great if you could add some docs here, detailing the motivation and how to best take advantage of what you're bundling.
good idea.