title: How to import javascript library in main.js for global availability throughout vue app?
body: <p>My <code>main.js</code> contains <code>import &quot;mathjs&quot;;</code> and seems to be working fine within main.js as</p>
  <pre><code>console.log(median(5,4,6,1));
  &gt; 4.5
  </code></pre>
  <p><code>median()</code> is however not available outside of main.js, i.e. in components. After reading <a href="https://forum.vuejs.org/t/how-to-use-a-third-party-library-js-without-export-in-my-component/23047" rel="nofollow noreferrer">this answer</a>, I assumed that the simple import should be enough for global availability throughout the vue app?</p>