Skip to content

Production builds and deployments

Justin Willis edited this page Jul 20, 2021 · 1 revision

Building for production

Our production build uses Rollup (with the rollup.config.js file) to compile our TypeScript to standard ESM JavaScript, bundle and then minify our code to make everything as small and fast as possible. This build also runs Workbox to ensure we have a production ready Service Worker. To run a production build you should run npm run build, this will output the built code to our dist folder, which is what gets deployed into production.

Production Deployments

PWABuilder is deployed using Azure Static Web Apps. To kick off a production build you will need to make a PR against the main branch of the site. This will trigger a build by Azure Static Web Apps which will then deploy to a staging URL if the build is successful (this URL will show up as a comment in the PR along with the current build status). You can also see these builds in the Actions tab above. Once a PR is reviewed and merged by a team member Azure Static Web Apps will kick off a build using the main branch and deploy a prod build of that branch to production.