Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable devtools ? #406

Open
Mikaleb opened this issue May 27, 2024 · 17 comments
Open

How to disable devtools ? #406

Mikaleb opened this issue May 27, 2024 · 17 comments
Labels
question Further information is requested

Comments

@Mikaleb
Copy link

Mikaleb commented May 27, 2024

Is there an option to disable this shiny new devtool ?

@Yordan-Ramchev
Copy link
Contributor

@Mikaleb
Copy link
Author

Mikaleb commented May 28, 2024

Not working :/

@Mikaleb Mikaleb closed this as completed May 28, 2024
@Mikaleb Mikaleb reopened this May 28, 2024
@alexzhang1030
Copy link
Member

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

@gangsthub
Copy link

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
Copy link

HybridEyeGrillage commented May 29, 2024

@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
Copy link
Member

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.

@alexzhang1030 alexzhang1030 added the question Further information is requested label Jun 13, 2024
@LukerSpringtree
Copy link
Contributor

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
Copy link
Member

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
Copy link

eachann1024 commented Jun 28, 2024

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
Copy link

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
Copy link
Member

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

  • cmd + shift + D in macOS
  • alt + shift + D in Windows

align with Nuxt devtools.

@dash-
Copy link

dash- commented Sep 4, 2024

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
Copy link

NiklasBeierl commented Sep 6, 2024

@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).

@tryforceful
Copy link

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.

(cc @alexzhang1030 ) I think this is worth mentioning in the main documentation, or in the FAQ. It's not clear (at least to me, and probably other developers) that the plugin doesn't get included in vite build steps out-of-the-box without any user configuration.

@alexzhang1030
Copy link
Member

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.

(cc @alexzhang1030 ) I think this is worth mentioning in the main documentation, or in the FAQ. It's not clear (at least to me, and probably other developers) that the plugin doesn't get included in vite build steps out-of-the-box without any user configuration.

make sense, I will update it

@WORMSS
Copy link

WORMSS commented Nov 21, 2024

Does anyone have a fix for removing this annoying floating panel thing?

image

I have the option turned off.. but the thing keeps reappearing?

image

Other than doing this little hack.

image

@lbhopper
Copy link

lbhopper commented Dec 4, 2024

Comment out import vueDevTools from 'vite-plugin-vue-devtools' in vite.config.js then comment out vueDevTools() from the plugins
vite config ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests