You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/shared-options.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -624,8 +624,22 @@ Learn more in Vite's [SSR guide](/guide/ssr#vite-cli). Related: [`server.middlew
624
624
-**Type:**`boolean` | `DevToolsConfig`
625
625
-**Default:**`false`
626
626
627
-
Enable devtools integration for visualizing the internal state and build analysis.
628
-
Ensure that `@vitejs/devtools` is installed as a dependency. This feature is currently supported only in build mode.
627
+
Enable devtools integration for inspecting the dev server and analyzing builds.
628
+
Ensure that `@vitejs/devtools` is installed as a dependency. Install `@vitejs/devtools-vite` to inspect the Vite dev server and `@vitejs/devtools-rolldown` to enable build analysis. DevTools runs for both `serve` and `build` by default; use `apply` to limit it to either command.
629
+
630
+
Plugin `config` hooks cannot change the `devtools` option. Set it in the user config instead.
631
+
632
+
When installed, `@vitejs/devtools` provides the type definitions for this option:
633
+
634
+
```ts
635
+
import { defineConfig } from'vite'
636
+
637
+
exportdefaultdefineConfig({
638
+
devtools: {
639
+
apply: 'serve',
640
+
},
641
+
})
642
+
```
629
643
630
644
See [Vite DevTools](https://github.com/vitejs/devtools) for more details.
0 commit comments