Can you post the entire file, not just that snippet?
Error: "Vue is not defined"
I can use vue if I include the compiled javascript at the end of the body, but if I attempt to use it the @JeffreyWay way I get this error: "Uncaught ReferenceError: Vue is not defined"
I installed vue via: npm install vue --save I included it via: var Vue = require('vue'); using browserify in elixir: mix.browserify('app.js'); I included it in the body using:
Here is my test code for it:
var registration = new Vue({
data: {
email: ''
}
}).$mount('#registration-form');
Any help is appreciated, thanks!
@calebporzio You are trying to access Vue as if it were available globally. When you are using browserify, each module needs to declare its own dependencies.
I suggest watching this introduction to browserify: https://laracasts.com/lessons/clean-javascript-with-browserify
Please or to participate in this conversation.