Chapter 16. Deploying Aurelia applications

 

This chapter covers

  • Bundling an application for deployment
  • Bundling and HTTP/2—things to consider
  • Creating a deployment package using npm
  • Deploying an Aurelia application to Firebase

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.

16.1. SPA bundling

16.2. Bundling and the Aurelia CLI

16.3. Deploying my-books to Firebase

Summary