Hacker News new | ask | show | jobs
by alayek 3136 days ago
This is an apple to orange comparison.

Gulp is a tool that lets you decide what the build process should look like.

Webpack is a tool where you define entry points, split points etc., and what you finally need. Based on that webpack decides how to go about the build.

Most of what Gulp does, can be replaced with NPM scripts.

1 comments

it's the streaming/caching side of gulp that I find most useful to be honest. When I have 3-4 build outputs being generated and I can offload intermediate objects into a cache file and back it can lead to really fast builds. In replacing grunt with gulp and setting up gulp correctly I've reduced builds from 10-15 seconds to nearly instant before, and I think the main failing of webpack is how slow a non-watch build can run, or how large its output size can be. I think entrypoints and code splitting could be achieved with a gulp-like system by picking files to be packaged into different builds.

It's also very easy to find build bottlenecks with gulp which is very handy if you have a large project with a slow build. It allows you to scale out efficiently.

Webpack hot reload server solves this problem and provides nearly instant builds.

Yes, production (“non-watch”) builds can take a while. But who cares? You shouldn’t be running a production build after every code change. That’s why the hot reload server is so useful; it only recompiles the code you changed.