Last active
June 4, 2024 16:57
-
-
Save mallardduck/96c43dcd6a054dd9616dc9fbb9cb6fdd to your computer and use it in GitHub Desktop.
Enable Vue DevTools in Prod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = Array.from(document.querySelectorAll('*')).find((e) => e.__vue__).__vue__ | |
const devtools = window.__VUE_DEVTOOLS_GLOBAL_HOOK__ | |
devtools.enabled = true | |
const Vue = Object.getPrototypeOf(app).constructor | |
while (Vue.super) { | |
Vue = Vue.super | |
} | |
Vue.config.devtools = true | |
devtools.emit('init', Vue) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment