Skip to content

Instantly share code, notes, and snippets.

@ekwoster
Last active February 20, 2023 19:23
Show Gist options
  • Save ekwoster/2748d66851231063f9c23d07912c66ec to your computer and use it in GitHub Desktop.
Save ekwoster/2748d66851231063f9c23d07912c66ec to your computer and use it in GitHub Desktop.
Vue3 force vue.tools on prod
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