DEV Community

Discussion on: Gulp vs Web-pack

Collapse
 
crenshaw_dev profile image
Michael Crenshaw

To me, they serve different purposes. Gulp manages a set of tasks, but is pretty ignorant of what those tasks actually entail. Webpack provides the "guts" of one type of task, specifically preparing source code for use on the web.

Crutchfield uses Gulp to manage build tasks, because it integrates well with Visual Studio. But we launch Webpack in a Gulp task to actually build our JS assets.

Collapse
 
jkimquickdev profile image
Kim John

Got it, so Gulp seems like more of generic tool to deal with any kind of task whereas Webpack is specific to web-project.

Kim John

Collapse
 
crenshaw_dev profile image
Michael Crenshaw

Pretty much. I'll add the caveat that Webpack can compile to targets besides the web. But it's still basically a compiler.

Thread Thread
 
jkimquickdev profile image
Kim John

Ohh! Could please elaborate this little: "Webpack can compile to targets besides the web". Thanks for your response. :)

Kim John

Thread Thread
 
crenshaw_dev profile image
Michael Crenshaw

Sure! The target is specified in Webpack's config (just a JSON object full of settings). There are a number of target options, but the two I'm familiar with are web and node. web builds JS to be served to web browsers. node builds JS to run on a server with the nodejs runtime.

Thread Thread
 
jkimquickdev profile image
Kim John

This is good information. I'll definitely look into this. Thanks for this. :)

Kim John