PWAs

Building PWAs with Stencil

Want to build a PWA with Stencil? Follow these instructions to instantly have a production ready PWA.

  • Run git clone https://github.com/ionic-team/stencil-app-starter.git my-pwa in your terminal.
  • Run npm run build
And with just those two commands you now have a PWA that scores 100 on lighthouse right out of the box.

Under the hood

Service Worker

When your run npm run build we automatically generate a Service Worker for you using Workbox that handles pre-caching your assets.

Read more about Service Workers here.
Web Manifest

By default we include a Web Manifest that has all the neccessary entries to get the Add to Homescreen prompt. You can see that web manifest here .

PWAs built with Stencil