简体   繁体   中英

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?

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

Here is the code .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM