Home > Q&A > body text
Developed a project using vue webpack
Vue is not defined is thrown directly when accessing Vue in the browser console
// main.js new Vue({ router, store, render: h => h(App) }).$mount('#app-box')
How to access the vue instance externally?
给我你的怀抱2017-05-19 10:37:32
Set a window.xxx = this;
仅有的幸福2017-05-19 10:37:32
var app = new Vue()
Isn’t this enough?
我想大声告诉你2017-05-19 10:37:32
window.app = new vue({});This way you can print app in the console