title: Importing stripe to a Vue.js component
body: <p><a href="https://alligator.io/vuejs/stripe-elements-vue-integration/" rel="nofollow noreferrer">https://alligator.io/vuejs/stripe-elements-vue-integration/</a></p>
  
  <p>On this website, it says we need to import the file with the script tag in the index.html file, which I did, but I noticed I get a js error.</p>
  
  <p>It's only when I imported directly the script inside the component that the error "'Stripe' is not defined" disappeared. </p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
  
      &lt;/div&gt;
  
  &lt;/template&gt;
  &lt;script src="https://js.stripe.com/v3/"&gt;&lt;/script&gt; 
  &lt;script&gt;
  
  
  export default {
    name: 'component',
  
  }
  &lt;/script&gt;
  
  &lt;!-- Add "scoped" attribute to limit CSS to this component only --&gt;
  &lt;style scoped&gt;
  
  &lt;/style&gt;
  </code></pre>
  
  <p>I don't want to import it directly inside my component, because it's not clean, what can I do?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width,initial-scale=1.0"&gt;
      &lt;script src="https://js.stripe.com/v3/"&gt;&lt;/script&gt;
      &lt;title&gt;vue-app&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="app"&gt;&lt;/div&gt;
      &lt;!-- built files will be auto injected --&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>