File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ Learn more in Vite's [SSR guide](/guide/ssr#vite-cli). Related: [`server.middlew
515515
516516- ** Experimental:** [ Give Feedback] ( https://github.com/vitejs/devtools/discussions )
517517- ** Type:** ` boolean ` | ` DevToolsConfig `
518- - ** Default:** ` false ` ( ` true ` if ` @vitejs/devtools ` is installed)
518+ - ** Default:** ` false `
519519
520520Enable devtools integration for visualizing the internal state and build analysis.
521521Ensure that ` @vitejs/devtools ` is installed as a dependency. This feature is currently supported only in build mode.
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ import {
8585 isNodeLikeBuiltin ,
8686 isObject ,
8787 isParentDirectory ,
88- isPkgInstalled ,
8988 mergeAlias ,
9089 mergeConfig ,
9190 mergeWithDefaults ,
@@ -513,8 +512,8 @@ export interface UserConfig extends DefaultEnvironmentOptions {
513512 /**
514513 * Enable devtools integration. Ensure that `@vitejs/devtools` is installed as a dependency.
515514 * This feature is currently supported only in build mode.
516- * Defaults to true, if `@vitejs/devtools` is installed.
517515 * @experimental
516+ * @default false
518517 */
519518 devtools ?: boolean | DevToolsConfig
520519}
@@ -748,14 +747,11 @@ export async function resolveDevToolsConfig(
748747} > {
749748 const resolvedHostname = await resolveHostname ( config . server ?. host )
750749 const fallbackHostname = resolvedHostname . host ?? 'localhost'
751- const isEnabled =
752- config . devtools === true || ! ! ( config . devtools && config . devtools . enabled )
753750
754751 return {
755752 enabled :
756- config . devtools === false
757- ? false
758- : isEnabled || isPkgInstalled ( '@vitejs/devtools/cli-commands' ) ,
753+ config . devtools === true ||
754+ ! ! ( config . devtools && config . devtools . enabled ) ,
759755 config : {
760756 ...( isObject ( config . devtools ) ? config . devtools : { } ) ,
761757 host : isObject ( config . devtools )
Original file line number Diff line number Diff line change @@ -1774,11 +1774,3 @@ export function monotonicDateNow(): number {
17741774 lastDateNow ++
17751775 return lastDateNow
17761776}
1777-
1778- export function isPkgInstalled ( moduleName : string ) : boolean {
1779- try {
1780- import . meta. resolve ( moduleName )
1781- return true
1782- } catch { }
1783- return false
1784- }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { defineConfig } from 'vite'
33export default defineConfig ( {
44 base : '/' ,
55 devtools : {
6- enabled : true ,
6+ enabled : false ,
77 port : 5173 ,
88 } ,
99} )
You can’t perform that action at this time.
0 commit comments