obfish
obfish

Reputation: 667

How do Vue devtool detect Vue on the webpage?

When i was using webpack, I cannot access window.Vue, but the vue devtool can still work to tell whether the webpage uses vue, no matter in development mode or not.

Angular and react have their devtools too, which, i believe, can do the job as well.

I want to know, does the tool managed to access the Vue object through other methods? or is it something related to webpack?

Upvotes: 3

Views: 150

Answers (1)

Bert
Bert

Reputation: 82489

Vue devtools scans the DOM looking for DOM elements that have the __vue__ property.

Here is the code.

Upvotes: 4

Related Questions