title: EventBus in vue not working
body: <p>I have a Laravel (5.4) application with some Vue components in it. I would need to make some of those components communicate, so I decided to add an EventBus. The code is the following:</p>
  
  <p>app.js:</p>
  
  <pre><code>import VueResource from "vue-resource";
  import Vue from "vue";
  import Menu from "components/src/core/Menu.vue";
  
  import MapWrapper from "./components/MapWrapper.vue";
  import PaymentModal from "./components/PaymentModal.vue";
  
  require("../sass/app.scss");
  
  Vue.use(VueResource);
  
  Vue.component("map-wrapper", MapWrapper);
  Vue.component("my-menu", Menu);
  Vue.component("payment-modal", PaymentModal);
  
  // eslint-disable-next-line
  new Vue({
      el: "#app",
  });
  </code></pre>
  
  <p>event.js:</p>
  
  <pre><code>import Vue from "vue";
  
  const EventBus = new Vue();
  
  export default EventBus;
  </code></pre>
  
  <p>component that should trigger the event:</p>
  
  <pre><code>&lt;template&gt;
      &lt;div style="height: 100%; width: 100%;"&gt;
          &lt;button @click="emitEvent"&gt;Click me&lt;/button&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import Vue from "vue";    
  import EventBus from "../event";
  
  export default {
      methods: {
          emitEvent() {
              console.log(EventBus);
              EventBus.$emit("testEvent", "test");
          },
      },
  };
  &lt;/script&gt;
  &lt;style&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>component that should receive the event:</p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import EventBus from "../event";
  
  export default {
      computed: {
          test() {
              EventBus.$on("testEvent", ($event) =&gt; {
                  console.log("event triggered", $event);
              });
          },
      },
  };
  &lt;/script&gt;
  
  &lt;style&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>The problem is that when I click the button I can see the EventBus logged by the console, but nothing else happen, the receiving components does not catch the event.</p>
  
  <p>What am I missing?</p>