Assets Bundlers

The implementation of the ES6 import/export syntax has rendered many traditional module loaders such as RequireJS / AMD(Alexa's Ranking: 114,259) and rollup (Alexa's Ranking: 143,033) useless. However, asset bundlers still find their place in modern web development.

An assets bundler packs multiple files into a smaller set of files, thereby reducing the number of requests to the server and communication overhead. The bundling process typically involves script minification, dead code removal, and dependencies management. This also allows for more modular front-end web development.

If a JavaScript file uses a source file, a .map file will be generated for it.

Before using the various libraries explained in this chapter, make sure you have Node.js already installed.