[Vuejs]-How to add Vue to existing Webpack project

3👍

You should import Vue to a variable like this:

import Vue from 'vue'; // or import Vue from '../../node_modules/vue/dist/vue.min.js';

It should then work with your example:

import Vue from 'vue';

var app = new Vue({
  el: ‘#app’,
  data: {
    message: ‘Hello Vue!’
  }
})

Leave a comment