[Vuejs]-Uncaught ReferenceError: Vue is not defined in .vue file

4👍

The <script> tags of single file components have to export the object you’d normally pass to the new Vue() constructor. You also don’t need the el property because Vue will use the <template> as the root element.

<script>
export {
  methods: {
    open: function(which, e) {
      // Prevents clicking the link from doing anything
      e.preventDefault();
    }
  }
};
</script>

Leave a comment