title: Register custom filters with vue.js
body: <p>I am using Vue.js with Laravel with Elixir and Browserify. I want to register some custom global filters, each in their own file. I tried to follow the docs, but I can't get it to work. This is the error I get:</p>
  
  <pre><code>Uncaught ReferenceError: Vue is not defined
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Here's my code:</p>
  
  <p>vue/filters/reverse.js</p>
  
  <pre><code>Vue.filter('reverse', function (value) {
   return value.split('').reverse().join('')
  })
  </code></pre>
  
  <p>vue/app.js</p>
  
  <pre><code>var Vue = require('vue');
  Vue.use(require('vue-resource'));
  
  new Vue({
      el: 'app',
      data: {
          test: 'abcde'
      },
  filters: {
      reverse: require './filters/reverse.js'
  }
  
  });
  </code></pre>
  
  <p>View</p>
  
  <pre><code>&lt;h1 v-text="test | reverse"&gt;&lt;/h1&gt;
  </code></pre>
  
  <p>If I add this in reverse.js, it still doesn't work</p>
  
  <pre><code>var Vue = require('vue');
  </code></pre>
  
  <p>And my gulpfile</p>
  
  <pre><code>    mix.browserify('app.js');
  </code></pre>