FAQ

Does Webpack replace Gulp/Grunt?

Yes. Webpack generally does all that Gulp and Grunt do—and more—albeit in a different way. The only reason to keep a task runner around is simply out of convenience: either you have an existing task runner project and don’t wish to convert everything, or you simply don’t have time to learn Webpack’s methods.

Webpack specializes in building and compiling, so that responsibility is taken away from Gulp/Grunt. And for miscellaneous tasks, Node scripts are a decent replacement. A typical Node Script can be invoked by calling npm run [scriptName], and is configured within package.json:

{
  "scripts": {
    "build": "webpack -p",
    "watch": "webpack --watch",
  }
}

Is this a static site generator?

Yes, and more. Unlike pure static site generators, Webpack can live in projects with a full backend. Being a Node-based tool, obviously Webpack can live in a NodeJS project. But it can just as easily be used in a Rails or Firebase project. The same Webpack project can be ported across different backend environments—or no backend at all—with very few changes.

results matching ""

    No results matching ""