Bundling combines application source files into fewer JavaScript files so browsers can load a frontend application with fewer server requests. It is one step in the broader build process. section 1.3.1
A typical frontend build separates several responsibilities:
- Transform component templates into JavaScript that creates each component’s view. section 1.3.1
- Combine application component code into an application bundle such as app.bundle.js. section 1.3.1
- Combine third-party dependencies into a vendor bundle such as vendors.bundle. section 1.3.1
- Optionally produce multiple bundles and lazy-load them when larger applications need code later. section 1.3.1
A framework build
After development, a framework CLI can run a command such as npm run build. The resulting files may include app.bundle.js for application code and vendors.bundle for third-party code. Minification may further reduce file size by removing whitespace and comments and shortening variable names. section 1.3.1
Figure 1.4 A simplified diagram of a frontend application’s build process
A simplified build-process diagram helps connect template compilation, code transformation, bundling, and delivery. section 1.3.1








