title: How to import Vue object inside .js file to html
body: <p>I am using Vue.js for some data binding and data filtering.
  I have created a Vue object inside a .js file and I want to export it and then import it from my html. </p>
  
  <p><a href="https://i.stack.imgur.com/cIZEY.png" rel="nofollow noreferrer">My object</a></p>
  
  <p>I have tried to export with <code>export default { testObject };</code> and then import it in html like (my file is inside a folder named js/ ).</p>
  
  <pre><code>&lt;script type="module" src="js/testFile.js"&gt;
  
      var testObject = require('./js/testFile');
  
  &lt;/script&gt;
  </code></pre>
  
  <p>This doesn't seem to work.</p>
  
  <p>Is there a way which this can be done?</p>