devtools
devtools copied to clipboard
Config options for Vue 3
What problem does this feature solve?
In Vue 2, we were able to set the config options on the global Vue object, like so:
// STAGE === "staging"
Vue.config.devtools = STAGE !== "prod"; // sets true
With Vue 3, we use this setup:
const app = Vue.createApp({})
app.config = {...}
app.config here doesn't expose a devtools options as Vue.config did, I've tried digging around and asked about this on the forums but it doesn't seem to be implemented yet.
What does the proposed API look like?
// STAGE === "staging"
const app = Vue.createApp({})
app.config.devtools = STAGE !== "prod"; // sets true