RollupJS is a build tool that allows us to prepare our applications in different ways, depending on the environment. There have been many tools before it (Grunt, Gulp), many that are competing with it (Webpack, Parcel), and many that will be built in the future. We will focus on RollupJS for our specific use case (getting our static server application built in Chapter 9, Practical Example – Building a Static Server), but just note that most build tools are similar in terms of their architecture.
What RollupJS gives us is a way to have hooks into different parts of the build life cycle. Most applications have the following states during a build process:
- Build start
- Dependency injection
- Compilation
- Post compilation
- Build end
Each of these states may go by different names in different build systems, and some may even have more than just these (as we...