concept bundle in category aurelia

This is an excerpt from Manning's book Aurelia in Action.
Prepend— Dependencies included in this step are prepended to the start of the bundle. This is useful for dependencies that rely on an object being available globally (for example, Bootstrap). Main bundle— The main body of the bundle. Modern libraries or libraries without legacy style dependencies go here (for example, aurelia-fetch-client).
In the previous chapter, you learned how to add unit and E2E tests to your application to give you the confidence needed to deploy to production early and often. But now that you’re ready to go, how do you take an Aurelia application and deploy it to a live server? Fortunately, the Aurelia CLI takes care of most of the work involved in creating a production-ready application. In chapter 2, you saw that although Aurelia projects comprise many small JavaScript, HTML, and CSS files, the CLI takes these files and bundles them into two JavaScript files (a vendor bundle and an application bundle). In this chapter, you’ll learn more about why the CLI bundles the way it does, and how you can alter bundles to suit the needs of your own application. You’ll also learn how you can avoid the common bundling pitfalls that many SPA developers fall into by using the CLI’s bundle-versioning feature. To round out the chapter, you’ll prepare the my-books application for deployment and upload it to Google’s Firebase.
You can configure bundle versioning in the options section of the aurelia.json file. This section also includes settings to control whether the application should be minified (stripped of unnecessary characters to make the browser payload smaller), and whether source-map files should be used. To enable versioning, add a new rev (revisions enabled) property to the options section. You can enable bundling for all environments by setting the rev property value to true. This isn’t recommended, however, because versioned bundles don’t play nicely when running the au run command in watch mode. Instead, a preferable approach is to specify a list of environments in which versioning should be enabled by specifying the environment names separated by the ampersand (&) character. For example, a common approach is to enable it on staging and production, as shown in the following listing.
Listing 16.2. Enabling bundle versioning (aurelia.json)
... "options": { "minify": "stage & prod", "sourcemaps": "dev & stage", "rev": "stage & prod" #1 }, ...You can run the my-books application in staging mode by passing the target environment to the CLI run command: au run --env stage. If you refresh the page and check the network tab, you’ll see that the bundles now include a suffix generated by hashing the bundle contents. This is depicted in figure 16.2.