Why is Vue.js Chrome Devtools not detecting Vue.js?

后端 未结 13 1881
暖寄归人
暖寄归人 2021-02-01 13:25

I have the following code with a simple working Vue.js application. But the vue.js devtools is not responding. It was working well a few days ago, now it\'s not working anymore

13条回答
  •  耶瑟儿~
    2021-02-01 13:46

    I'm using Vue in electron and I have the electron main "app" separated Vue's "app".

    When in the the debugger console, typing Vue was giving the error Uncaught ReferenceError: Vue is not defined

    Here was my fix

    window.vue = new Vue({
      components: {
        App,
        Login,
      },
      router,
      store,
      template: '',
    }).$mount('#app');
    

    The work-around was assigning window.Vue so the devtool could find it.

提交回复
热议问题