Understanding bundlers
Writing a modern web application is quite difficult. One of the reasons for the level of difficulty is the large variety of different technologies that need to be involved in the process. Let’s just mention a few:
- HTML for writing documents
- CSS for styling those documents
- JavaScript with the DOM API to bring some interactivity
- A JavaScript UI framework to create interactive components
- A CSS preprocessor to use variables, nesting, and more features for CSS
- Potentially TypeScript or some other typed system to improve reliability in certain source code areas
- Service and web workers need to be mastered
- All static files should be easy to cache
Before the introduction of a new class of tooling that was capable of building up module graphs, dedicated task runners such as Grunt or Gulp were used. These runners were inspired by more generic approaches such as Makefiles. The problem, however, was that two aspects –...