You can run arbitrary tasks in Gulp. The most common task is build. But that build task is chained together via scripting and plugins.
Webpack only deals with the build. But instead of script, it aims for a more declarative API with config files.
So Webpack only covers the build part of Gulp. Which leaves all of the other scripting capabilities of Gulp. However, a major opinion now is to just write vanilla JS scripts and call them via npm commands and hooks. Gulp has strange api, is callback heavy, and everything needs a Gulp plugin to work. Plain javascript scripts can be closer to normal javascript, and npm can use the tool's CLI directly.
Webpack only deals with the build. But instead of script, it aims for a more declarative API with config files.
So Webpack only covers the build part of Gulp. Which leaves all of the other scripting capabilities of Gulp. However, a major opinion now is to just write vanilla JS scripts and call them via npm commands and hooks. Gulp has strange api, is callback heavy, and everything needs a Gulp plugin to work. Plain javascript scripts can be closer to normal javascript, and npm can use the tool's CLI directly.