Along the various advantages of using Webpack, as yet another bundler, these are the most important ones:
Code splitting: Based on the code size, it helps modularize the code chunks of code and loads these modules as and when needed. You can define the split points on your code, based on which the code chunks will be used. Thus, it helps in faster page load and performance improvement.
Loaders: As in the earlier-mentioned image, in the left-hand side, you can see that there are various other formats such as
coffescripts
/jsx
instead of JavaScript and .less instead of.css
. Thus, these loaders (npm
packages) are used to convert these other formats into the accepted standardized formats, which makes the life of the developers much easy to code into any format they want. In React-based applications that we were seeing earlier, JSX formats are widely used. Hence, these loaders will come handy.Clever parsing: It helps to parse most of the third-party library and handles the...