title: vuejs place global mixin into seperate file
body: <p>i would like to create a global mixin that is in a seperate file. all the tutorial i have seen online always place the mixin into the same file, or don't explain how to import another file.</p>
  <p>mixins don't really make sense if they are all in the same file, so there has to be some way to load them from a different file, right?</p>
  <p>here is my test mixin_test.js:</p>
  <pre><code>export default mixin_test = {
      
      methods: {
          test: function( msg )
          {
              console.log( msg );
          }
      }
  }
  </code></pre>
  <p>in the app.js i have the following:</p>
  <pre><code>...
  import mixin_test from &quot;./mixin_test.js&quot;;
  ...
  </code></pre>
  <p>and in my component:</p>
  <pre><code>export default {
      name:&quot;something&quot;,
      
      mixins: [mixin_test],
      
      mounted(){
          this.test( &quot;hello world&quot; );
      }
  }
  </code></pre>
  <p>if i open the page in a web browser i get the error message:</p>
  <pre><code>Uncaught ReferenceError: assignment to undeclared variable mixin_test
  </code></pre>
  <p>does anyone have any idea what the issue is?</p>