The key point there are two things:
So let’s take a look at what webpack looks like from 1000-feet overview.
So let’s talk about module first.
Nowadays, we have lots of implementations for Front-end modularization such as AMD, CMD, CommonJS, ES6 and with the help of webpack, we can choose to use either. Today, the most popular one is the ES6.
Before the advent of webpack, if developers wanted to develop front-end in a modular way, they had to figure out how to solve the modularity and deal with the dependencies of each module.
Comparison of webpack and Grunt/Gulp
Grunt/Gulp is a front-end automated task management tool whose core is to automate the entire project process, not modular.
Webpack emphasizes modular development management, and file compression and pre-processing functions are just a few of its features.
So below situations are fit for Grunt/Gulp:
- If the dependencies of your project are really easy and have almost o modules.
- Just a simple merge, compression operation