Last active
February 20, 2023 19:23
-
-
Save ekwoster/2748d66851231063f9c23d07912c66ec to your computer and use it in GitHub Desktop.
Vue3 force vue.tools on prod
This file contains hidden or 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_app__).__vue_app__ | |
const version = app.version | |
const devtools = window.__VUE_DEVTOOLS_GLOBAL_HOOK__ | |
devtools.enabled = true | |
devtools.emit('app:init', app, version, {}) | |
/** Source: https://mokkapps.de/vue-tips/force-enable-vue-devtools-in-production-build/ */ | |
/** After this code press Option+R on Mac */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment