Skip to content

Vue.js not detected on Mac chrome #2003

Answered by jj112358
jj112358 asked this question in Q&A
Discussion options

You must be logged in to vote

I had found of the reason of this issue by tracking devtools source code.
I imported composition API from Vue only, not using createApp to set up dev tools
dev tools using window.__VUE__ === ture to determin whether detected vue.js or not
like this

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../node_modules/vue/dist/vue.global.js"></script>
  </head>
  <body>
    <div>hello</div>
    <script>
      const { createApp } = Vue

      createApp({
        data() {
          return {

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jj112358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant