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
+33-20Lines changed: 33 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,32 +36,19 @@ Install or upgrade your Vite to the beta version 13+:
36
36
}
37
37
```
38
38
39
-
Install the required DevTools plugin for both client modes:
39
+
Install the required DevTools package:
40
40
41
41
```bash
42
42
pnpm add -D @vitejs/devtools
43
43
```
44
44
45
-
Vite DevTools supports two client modes: embedded and standalone. You can choose the mode in your Vite config.
45
+
Vite DevTools has two client modes. Configure one mode at a time.
46
46
47
-
Use embedded mode:
47
+
### Standalone mode
48
48
49
-
```ts [vite.config.ts] twoslash
50
-
import { DevTools } from'@vitejs/devtools'
51
-
import { defineConfig } from'vite'
49
+
The DevTools client runs in a standalone window (no user app).
52
50
53
-
exportdefaultdefineConfig({
54
-
plugins: [
55
-
DevTools(),
56
-
],
57
-
build: {
58
-
rolldownOptions: {
59
-
devtools: {}, // enable devtools mode
60
-
},
61
-
}
62
-
})
63
-
```
64
-
Or use standalone mode:
51
+
Configure `vite.config.ts`:
65
52
66
53
```ts [vite.config.ts] twoslash
67
54
import { defineConfig } from'vite'
@@ -73,19 +60,45 @@ export default defineConfig({
73
60
})
74
61
```
75
62
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.
63
+
Run:
77
64
78
65
```bash
79
66
pnpm build
80
67
```
81
68
69
+
After the build completes, open the DevTools URL shown in the terminal.
82
70
83
-
If you're using embedded mode, start your app and open the DevTools panel in the browser:
71
+
### Embedded mode
72
+
73
+
The DevTools client runs inside an embedded floating panel.
74
+
75
+
Configure `vite.config.ts`:
76
+
77
+
```ts [vite.config.ts] twoslash
78
+
import { DevTools } from'@vitejs/devtools'
79
+
import { defineConfig } from'vite'
80
+
81
+
exportdefaultdefineConfig({
82
+
plugins: [
83
+
DevTools(),
84
+
],
85
+
build: {
86
+
rolldownOptions: {
87
+
devtools: {}, // enable devtools mode
88
+
},
89
+
}
90
+
})
91
+
```
92
+
93
+
Run:
84
94
85
95
```bash
96
+
pnpm build
86
97
pnpm dev
87
98
```
88
99
100
+
Then open your app in the browser and open the DevTools panel.
0 commit comments