E
E
egsi2018-10-19 13:56:11
gulp.js
egsi, 2018-10-19 13:56:11

Why integrate Webpack into Gulp?

Often there are examples when Webpack is integrated into the assembly of the Gulp project. Why do this when you can just include Webpack separately. As I understand it, this is done most often in projects in which Gulp was already installed earlier, so as not to break the existing structure. Are there any other benefits to this approach?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergiu Mitu, 2018-10-19
@EaGames

I do it myself, gulp is responsible for:
1. Compiling scss.
2. browserSync
3. Copying images to ./dist ( (and optimizing them in production mode)
4. png sprite
5. svg sprite
6. Copying fonts/favicon and any audio/video files to ./dist
7. Compiling nunjucks files ( not always)
8. Watch all these delights with browserSync synchronization
9. Launch webpack which is responsible only for JS bundle
All 8 points can be done with webpack as well, but only through one big fat place
. there is a working option but it looks very terrible.
I myself thought why use 2 tools if you can do everything through 1, but no, 2 is better, but each for its own task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question