Skip to content

Commit 81888e5

Browse files
authored
docs: update devtools usage guide (#186)
1 parent 6b02f38 commit 81888e5

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

docs/guide/index.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,26 @@ Vite DevTools is a comprehensive set of developer tools for visualizing and anal
2525

2626
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:
2727

28-
Install or upgrade your Vite to the beta version 8:
28+
Install or upgrade your Vite to the beta version 13+:
2929

3030
<!-- eslint-skip -->
3131
```json [package.json]
3232
{
3333
"dependencies": {
34-
"vite": "^8.0.0-beta.7"
34+
"vite": "^8.0.0-beta.13"
3535
}
3636
}
3737
```
3838

39-
Install the DevTools plugin:
39+
Install the required DevTools plugin for both client modes:
4040

4141
```bash
4242
pnpm add -D @vitejs/devtools
4343
```
4444

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:
4648

4749
```ts [vite.config.ts] twoslash
4850
import { DevTools } from '@vitejs/devtools'
@@ -59,14 +61,26 @@ export default defineConfig({
5961
}
6062
})
6163
```
64+
Or use standalone mode:
6265

63-
Run your Vite build, to generate the Rolldown build metadata:
66+
```ts [vite.config.ts] twoslash
67+
import { defineConfig } from 'vite'
68+
69+
export default defineConfig({
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.
6477

6578
```bash
6679
pnpm build
6780
```
6881

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:
7084

7185
```bash
7286
pnpm dev

0 commit comments

Comments
 (0)