vuejs / devtools-next

The next iteration of Vue DevTools
https://devtools.vuejs.org/
MIT License
1.46k stars 103 forks source link

How to disable devtools ? #406

Open Mikaleb opened 4 months ago

Mikaleb commented 4 months ago

Is there an option to disable this shiny new devtool ?

Yordan-Ramchev commented 4 months ago

This may help: https://vitejs.dev/guide/using-plugins#conditional-application

Mikaleb commented 4 months ago

Not working :/

alexzhang1030 commented 4 months ago

Can you unregister vite-plugin-vue-devtools in plugin options of vite.config.{j,t}s?

gangsthub commented 4 months ago

Is there an option to disable this shiny new devtool ?

What is the reason to disable it and what are the conditions to either show it or not? I think you could provide more context about what is it what you expect, @Mikaleb...

HybridEyeGrillage commented 4 months ago

@gangsthub I was also looking for something like this in the way of only having it enabled in a development environment and disabled in production. Something like how Inspector does it with a configurable enabled flag, see example below (probably not correct off the top of my head).

vite.config.ts

VueDevTools({
 enabled: process.env === 'development',
 launchEditor: 'code'
}),
alexzhang1030 commented 4 months ago

Currently, DevTools will be forcibly enabled during development (vite dev) and will never be bundled in production (vite build). So, don't worry about that.

LukerSpringtree commented 4 months ago

Currently, DevTools will be forcibly enabled during development (vite dev) and will never be bundled in production (vite build). So, don't worry about that.

maybe he want to disable the tool, when the envirment is develop.

just use shotcut to show tool's UI, but don't show the icon always.

alexzhang1030 commented 4 months ago

Currently, DevTools will be forcibly enabled during development (vite dev) and will never be bundled in production (vite build). So, don't worry about that.

maybe he want to disable the tool, when the envirment is develop.

just use shotcut to show tool's UI, but don't show the icon always.

image

You can disable this option to do this.

eachann1024 commented 3 months ago

Is there an option to disable this shiny new devtool ?

What is the reason to disable it and what are the conditions to either show it or not? I think you could provide more context about what is it what you expect, @Mikaleb...

I think the corresponding habit settings can be saved in the project's .local, for example:

  1. Scenario 1: Enter pinia, open the store / time by default.
  2. Project members prefer the chrome extension version of vue dev. You can set whether to enable it in .local.
  3. [Critical] At the same time, the settings item reads .local, and developers sometimes need to clear localStorage, resulting in the settings item being repeatedly set.
gazedash commented 1 month ago

You can disable this option to do this.

How to open it again? Lmao... It disappeared and I don't get it how to open it back again.

First, I try to search HOW TO DISABLE IT, spend 10 minutes on it, find old solution, doesn't work Find this, fine, toggle this thingy, it disappears completely

Are you serious?

I understand that devtools is a good and helpful thing, but UX is severely lacking on this one...

alexzhang1030 commented 1 month ago

You can disable this option to do this.

How to open it again? Lmao... It disappeared and I don't get it how to open it back again.

First, I try to search HOW TO DISABLE IT, spend 10 minutes on it, find old solution, doesn't work Find this, fine, toggle this thingy, it disappears completely

Are you serious?

I understand that devtools is a good and helpful thing, but UX is severely lacking on this one...

Yeah, our shortcut descriptions are very lacking 😅. And sorry our contributors are currently very busy and not too active in solving this issue 🥲.

Anyway, this is a brief:

How to disable the devtools anchor?

You can disable the option called Always show the floating panel on the Settings page.

How to open it again?

By shortcut

dash- commented 1 month ago

I love this tool! It's very handy.

Unfortunately, it's also breaking my Cypress tests in my local development environment. I need to be able to programmatically prevent the floating buttons from appearing within Cypress, preferably without removing them completely from my development environment.

NiklasBeierl commented 1 month ago

@dash- Does that mean vue-devtools works for you in a cypress environment? As in: You could actually interact with them in a cypress-driven browser? Because that is what I am trying to achieve at the moment, but they just keep loading forever. (I guess I am having the opposite of your problem).