Search code examples
vue.jsvuejs2vue-devtools

Vue Devtools not working locally


Vue Devtools works on all demos/examples online but not on my local pages. Even with the following, the Vue Devtools icon remains gray ("Vue.js not detected"). Why?

<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
  <div id="app"></div>
  <script>    
    Vue.config.devtools = true;
  </script>
</body>
</html>

Solution

  • You must add at-least 1 instance of vue, for the devtools to detect it. So, do:

    new Vue({el: '#app'})