We need Babel because most of the browsers are not capable of understanding fancy code written in ES6, TS, JSX.
Webpack is a build or bundler tool. This build process consists of multiple tasks.
Tasks may be transpiling, uglify, minimising and bundling of CSS and JS. And also responsible for resolving the dependencies.
We specify these tasks in a configuration file and webpack uses multiple plugins to do these tasks. Babel is one of them.
Top comments (1)
Comparison of 2 absolutely different tools.. Babel is transpiler and Webpack/Rollup/Parcel are bundlers!! Take a minute to check what Esbuild is..