title: Cannot read property 'register' of undefined service worker Nuxt JS
body: <p>I'm trying to implement a custom built service worker into my Nuxt JS site. I'm getting an error after generating the site as follows:</p>
  
  <pre><code>Cannot read property 'register' of undefined
  </code></pre>
  
  <pre><code>function Notify (siteOptions) {
    /* Set Dependancies */
    this.siteOptions = siteOptions /* Register Applicant */
    this.register()
  } /** * Register Service Worker */
  Notify.prototype.register = function () {
    /** * Test Registration */
    navigator.serviceWorker.register('Notify-service-worker.js').then(function (registration) {
      console.log('SW: Available')
    }).catch(function (error) {
      console.error('SW: Not Available', error)
    })
  </code></pre>
  
  <p>It appears that this is the line causing issues:</p>
  
  <p><code>navigator.serviceWorker.register('Notify-service-worker.js')</code></p>