title: How to make a installable PWA using vuejs?
body: <p>I want to make my vue app installable via chrome/firefox using a button <strong>(to show a pwa install prompt)</strong></p>
  <pre><code>&lt;button @click=&quot;install&quot;&gt;install&lt;/button&gt;
  
  var deferredPrompt
  methods: {
    install() {
        deferredPrompt.prompt()
        deferredPrompt.userChoice.then((choiceResult) =&gt; {
            if (choiceResult.outcome === 'accepted') {
                console.log('User accepted the A2HS prompt')
            } else {
                console.log('User dismissed the A2HS prompt')
            }
            deferredPrompt = null
        })  
    }    
  }
  </code></pre>
  <p>Once i build the app and its online, i click the button and got deferredPrompt null on console.
  <strong>What im missing?</strong></p>
  <p><a href="https://i.stack.imgur.com/CoVsb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CoVsb.png" alt="Error" /></a></p>