title: No Service worker files ngsw.json / ngsw-worker.json generated when running build --prod. Angular 5
body: <p>Using angular 5.1.2 Angular-cli 1.6.3</p>
  
  <p>all files are pretty vanilla. dist folder is created</p>
  
  <p>My ngsw-config.json</p>
  
  <pre><code>{
  "index": "/index.html",
  "assetGroups": [
      {
          "name": "app",
          "installMode": "prefetch",
          "resources": {
              "files": [
                  "/favicon.ico",
                  "/index.html"
              ],
              "versionedFiles": [
                  "/*.bundle.css",
                  "/*.bundle.js",
                  "/*.chunk.js"
              ]
          }
      },
      {
          "name": "assets",
          "installMode": "lazy",
          "updateMode": "prefetch",
          "resources": {
              "files": [
                  "/assets/**"
              ]
          }
      }]   
  </code></pre>
  
  <p>}</p>
  
  <p>my app.module.ts uses</p>
  
  <pre><code>  ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
  </code></pre>
  
  <p>am using vanilla environment.ts and environment.prod.ts</p>
  
  <p>main.ts</p>
  
  <pre><code>import './polyfills.ts';
  import {enableProdMode} from '@angular/core';
  import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
  
  import {AppModule} from './app/app.module';
  import {environment} from './environments/environment';
  
  if (environment.production) {
  enableProdMode();
  }
  
  platformBrowserDynamic().bootstrapModule(AppModule)
  .then(() =&gt; {
  if ('serviceWorker' in navigator) {
      navigator.serviceWorker.register('ngsw-worker.js');
  }
  
  })
  .catch(err =&gt; console.log(err));
  </code></pre>
  
  <p>Not sure what else to check</p>