title: Angular PWA: no matching service worker detected
body: <p>This is my configuration:</p>
  
  <pre><code>Angular CLI: 8.2.1
  Node: 10.15.2
  OS: win32 x64
  Angular: 8.2.1
  ... animations, cli, common, compiler, compiler-cli, core, forms
  ... language-service, platform-browser, platform-browser-dynamic
  ... router, service-worker
  
  Package                           Version
  -----------------------------------------------------------
  @angular-devkit/architect         0.802.1
  @angular-devkit/build-angular     0.802.1
  @angular-devkit/build-optimizer   0.802.1
  @angular-devkit/build-webpack     0.802.1
  @angular-devkit/core              8.2.1
  @angular-devkit/schematics        8.2.1
  @angular/cdk                      8.1.2
  @angular/material                 8.1.2
  @angular/pwa                      0.802.1
  @ngtools/webpack                  8.2.1
  @schematics/angular               8.2.1
  @schematics/update                0.802.1
  rxjs                              6.4.0
  typescript                        3.5.3
  webpack                           4.38.0
  </code></pre>
  
  <p>I ran <code>ng add @angular/pwa</code>. It created the following <em>ngsw-config.json</em>:</p>
  
  <pre><code>{
    "$schema": "./node_modules/@angular/service-worker/config/schema.json",
    "index": "/index.html",
    "assetGroups": [
      {
        "name": "app",
        "installMode": "prefetch",
        "resources": {
          "files": [
            "/favicon.ico",
            "/index.html",
            "/*.css",
            "/*.js"
          ]
        }
      }, {
        "name": "assets",
        "installMode": "lazy",
        "updateMode": "prefetch",
        "resources": {
          "files": [
            "/assets/**",
            "/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
          ]
        }
      }
    ]
  }
  </code></pre>
  
  <p>My <em>package.json</em> contains:</p>
  
  <pre><code>"@angular/pwa": "^0.802.1",
  "@angular/service-worker": "~8.2.0",
  </code></pre>
  
  <p>My <em>angular.json</em> contains:</p>
  
  <pre><code>"serviceWorker": true,
  "ngswConfigPath": "ngsw-config.json"
  </code></pre>
  
  <p>This is my <em>manifest.webmanifest</em>:</p>
  
  <pre><code>{
    "name": "postit",
    "short_name": "postit",
    "theme_color": "#1976d2",
    "background_color": "#fafafa",
    "display": "standalone",
    "scope": "/",
    "start_url": "/",
    "icons": [...]
  }
  </code></pre>
  
  <p>I build using <code>ng build --prod</code> and deploy on my web server.</p>
  
  <p>I get a <code>No matching service worker detected</code> warning:</p>
  
  <p><a href="https://i.stack.imgur.com/QRXw2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QRXw2.png" alt="No matching service worker detected"></a></p>
  
  <p>When I turn to offline mode:</p>
  
  <p><a href="https://i.stack.imgur.com/hdH6F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hdH6F.png" alt="No internet connection"></a></p>
  
  <p>What did I miss so that offline mode works?</p>