title: How to do skipwaiting with register-service-worker in vue app?
body: <p>I have the following <code>registerServiceWorker.ts</code> in my application</p>
  
  <pre><code>/* eslint-disable no-console */
  
  import { register } from 'register-service-worker'
  
  if (process.env.NODE_ENV === 'production') {
      register(`${process.env.BASE_URL}service-worker.js`, {
          ready() {
              console.log(
                  'App is being served from cache by a service worker' 
  
              )
          },
          registered() {
              console.log('Service worker has been registered.')
          },
          cached() {
              console.log('Content has been cached for offline use.')
          },
          updatefound() {
              console.log('New content is downloading.')
          },
          updated() {
              console.log('New content is available; please refresh.')
              //@ts-ignore
              self.skipWaiting();
          },
          offline() {
              console.log('No internet connection found. App is running in offline mode.')
          },
          error(error) {
              console.error('Error during service worker registration:', error)
          }
      })
  }
  </code></pre>
  
  <p>How would I trigger the skipwaiting from code in the updated event?</p>