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/guide/index.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,24 +25,26 @@ Vite DevTools is a comprehensive set of developer tools for visualizing and anal
25
25
26
26
If you want to give an early preview, you can try it out by building this project from source, or install the preview build with the following steps:
27
27
28
-
Install or upgrade your Vite to the beta version 8:
28
+
Install or upgrade your Vite to the beta version 13+:
29
29
30
30
<!-- eslint-skip -->
31
31
```json [package.json]
32
32
{
33
33
"dependencies": {
34
-
"vite": "^8.0.0-beta.7"
34
+
"vite": "^8.0.0-beta.13"
35
35
}
36
36
}
37
37
```
38
38
39
-
Install the DevTools plugin:
39
+
Install the required DevTools plugin for both client modes:
40
40
41
41
```bash
42
42
pnpm add -D @vitejs/devtools
43
43
```
44
44
45
-
Enable the DevTools plugin in your Vite config and turn on the devtools mode for Rolldown:
45
+
Vite DevTools supports two client modes: embedded and standalone. You can choose the mode in your Vite config.
46
+
47
+
Use embedded mode:
46
48
47
49
```ts [vite.config.ts] twoslash
48
50
import { DevTools } from'@vitejs/devtools'
@@ -59,14 +61,26 @@ export default defineConfig({
59
61
}
60
62
})
61
63
```
64
+
Or use standalone mode:
62
65
63
-
Run your Vite build, to generate the Rolldown build metadata:
66
+
```ts [vite.config.ts] twoslash
67
+
import { defineConfig } from'vite'
68
+
69
+
exportdefaultdefineConfig({
70
+
devtools: {
71
+
enabled: true,
72
+
},
73
+
})
74
+
```
75
+
76
+
Run a Vite build to generate Rolldown build metadata. In standalone mode, DevTools also starts a local server to host the client after the build completes.
64
77
65
78
```bash
66
79
pnpm build
67
80
```
68
81
69
-
Open the DevTools panel in your browser to play with the DevTools:
82
+
83
+
If you're using embedded mode, start your app and open the DevTools panel in the browser:
0 commit comments