devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Config options for Vue 3

Open fredrivett opened this issue 5 years ago • 8 comments

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

fredrivett avatar Dec 15 '20 10:12 fredrivett