I am starting with Vue.js, and I am wondering how to import it properly, in order to bundle it with Webpack.
All the examples in the documentation seem to assume that a Vue
object is already present.
This is what I tried:
const Vue = require('vue')
and also
const Vue = require('vue').Vue
and then
var app = new Vue({ <options> })
This file is then bundled with Webpack and referenced in my HTML index file. But I am getting this error in the browser (in both cases):
Uncaught TypeError: Vue is not a constructor