Webpack is a packaging tool
Webpack is used to package your source files into a file, you have done a series of configurations, you can use a sentence Webpack to implement the functionality of packaging.
The role of Webpack is to start with a number of files, find all relevant files based on the citation relationship between files, and pack them into several packaged files.
Gulp is an automated tool .
Gulp is used to automate, after you write a bunch of tasks, you can do all the tasks you need with one sentence of gulp.
Used to look for dependencies between different tasks, find the right order of execution, and basically what tasks can be done, including webpack tasks. Example: Convert less file to CSS file
It is important to note that gulp itself, without loading any packages, can do nothing.
- If you are only loaded in the Gulp Webpack, then the role of gulp at this time = = = Webpack role;
- If you do not load the Webpack in the gulp, although it can also be packaged by some other tools, but the way of packaging is different from webpack, so at this time Gulp∩webpack =?;
- And if your gulp loaded webpack and other packages, then Webpack∈gulp.
Summary: Gulp can have a complete webpack, can also achieve similar alternatives, and vice versa.
The difference between Gulp and Webpack