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
description: 'Visualize and analyze your Vite build process with powerful developer tools. Extensible architecture for building custom DevTools integrations.',
35
+
description: 'An extensible devtools framework for the Vite ecosystem. Build, compose, and integrate developer tools with a unified foundation.',
Copy file name to clipboardExpand all lines: docs/.vitepress/theme/Home.vue
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,16 +11,16 @@ import Spacer from '@components/shared/Spacer.vue'
11
11
12
12
<HeadingSection
13
13
heading="Inspect, Analyze, Extend"
14
-
subheading="Vite DevTools not only provides built-in features, but also a extensible architecture for custom integrations."
14
+
subheading="Vite DevTools provides an extensible framework with built-in integrations like DevTools for Rolldown, plus an open architecture for custom tools."
Copy file name to clipboardExpand all lines: docs/guide/index.md
+72-19Lines changed: 72 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,33 @@ outline: deep
4
4
5
5
# Getting Started
6
6
7
-
> [!WARNING]
8
-
> Vite DevTools currently only supports build mode of Vite 8+.
9
-
> Dev mode and Vite versions under 8 are not supported yet.
10
-
11
7
## What is Vite DevTools?
12
8
13
-
Vite DevTools is a comprehensive set of developer tools for visualizing and analyzing your Vite build process. It provides deep insights into your build pipeline, module dependencies, and build metadata, helping you understand and optimize your Vite applications.
9
+
Vite DevTools is a devtools framework for the Vite ecosystem. Instead of each tool building its own devtools from scratch, Vite DevTools provides shared infrastructure — a unified dock system, type-safe RPC, shared state management, and flexible UI hosting — so that different tools compose together seamlessly, users get a consistent experience, and tool authors can focus on what makes their integration unique.
10
+
11
+
Any Vite plugin can hook into Vite DevTools with just a few lines of code, instantly gaining access to the full platform: panels, action buttons, server-client communication, and more.
12
+
13
+
### Built-in Integrations
14
+
15
+
-**[DevTools for Rolldown](/rolldown/)** — Build analysis, module graphs, chunks, assets, plugins, and performance insights
16
+
-**DevTools for Vite** — Vite-specific developer tools *(in development)*
17
+
18
+
### Ecosystem
19
+
20
+
Vite DevTools Kit is already powering a growing ecosystem of integrations:
21
+
22
+
-**[Nuxt DevTools v4](https://github.com/nuxt/devtools)** — Built on top of Vite DevTools Kit
23
+
-**[Oxc Inspector](https://github.com/yuyinws/oxc-inspector)** — Integrates via DevTools Kit with custom RPC functions
24
+
-**[UnoCSS Inspector](https://github.com/unocss/unocss)** — Dock integration for UnoCSS
25
+
-**[vite-plugin-vue-tracer](https://github.com/antfu/vite-plugin-vue-tracer)** — Action button that triggers a DOM inspector
14
26
15
27
### Key Features
16
28
17
-
-**🔍 Build Analysis**: Visualize module graphs, dependencies, and build metadata
18
-
-**📊 Performance Insights**: Understand build performance and bottlenecks
19
-
-**🧩 Extensible**: Build custom DevTools integrations with the DevTools Kit
29
+
-**🧩 Extensible Framework**: Any Vite plugin can extend the devtools with a simple hook
30
+
-**🔍 [DevTools for Rolldown](/rolldown/)**: Built-in build analysis with module graphs, dependencies, and build metadata
20
31
-**🎨 Unified Interface**: All DevTools integrations appear in a consistent dock interface
21
-
-**⚡ Type-Safe**: Full TypeScript support with type-safe RPC communication
32
+
-**🔌 Type-Safe RPC**: Built-in bidirectional communication between server and client
33
+
-**⚡ Shared State**: Automatic synchronization of data between server and client
22
34
23
35
## Installation
24
36
@@ -98,30 +110,71 @@ pnpm dev
98
110
99
111
Then open your app in the browser and open the DevTools panel.
100
112
113
+
#### Projects without an HTML entry
114
+
115
+
The embedded DevTools client is usually injected through Vite's `transformIndexHtml` hook. If your app does not start from an HTML entry, keep the `DevTools()` plugin enabled and import the client injector manually in your client entry instead:
116
+
117
+
```ts twoslash
118
+
import'@vitejs/devtools/client/inject'
119
+
```
120
+
121
+
This loads the same DevTools client that would normally be added to `index.html`. Put it in a browser entry such as `main.ts` or `entry.client.ts`, not in server-only files or shared SSR entry files.
122
+
123
+
If your project does have an HTML entry, avoid importing `@vitejs/devtools/client/inject` in addition to the HTML injection, as that would inject the client twice and create duplicate dock elements.
124
+
125
+
#### Building with the App
126
+
127
+
You can also generate a static DevTools build alongside your app's build output by enabling the `build.withApp` option:
128
+
129
+
```ts [vite.config.ts] twoslash
130
+
import { DevTools } from'@vitejs/devtools'
131
+
import { defineConfig } from'vite'
132
+
133
+
exportdefaultdefineConfig({
134
+
plugins: [
135
+
DevTools({
136
+
build: {
137
+
withApp: true, // generate DevTools output during `vite build`
138
+
// outDir: 'custom-dir', // optional, defaults to Vite's build.outDir
139
+
},
140
+
}),
141
+
],
142
+
build: {
143
+
rolldownOptions: {
144
+
devtools: {},
145
+
},
146
+
}
147
+
})
148
+
```
149
+
150
+
When `build.withApp` is enabled, running `pnpm build` will automatically generate the static DevTools output into the build output directory. This captures real build data from the same build context, so DevTools can display accurate build analysis without a separate build step.
151
+
101
152
## What's Next?
102
153
103
154
Now that you have Vite DevTools set up, you can:
104
155
105
-
-**Explore the built-in tools**: Check out the various panels and visualizations available in the DevTools interface
106
-
-**Build custom integrations**: Learn how to extend Vite DevTools with your own tools using the [DevTools Kit](/kit/)
156
+
-**Explore the built-in tools**: Check out the [DevTools for Rolldown](/rolldown/)panels and visualizations
157
+
-**Build custom integrations**: Learn how to extend the devtools with your own tools using the [Vite DevTools Kit](/kit/)
107
158
-**Contribute**: Help improve Vite DevTools by checking out our [contributing guide](https://github.com/antfu/contribute)
108
159
109
160
## Current Limitations
110
161
111
162
> [!NOTE]
112
-
> Vite DevTools is currently in active development with the following limitations:
163
+
> Vite DevTools is currently in active development.
113
164
114
-
-**Build mode only**: Currently works with Vite-Rolldown's build mode
115
-
-**Dev mode**: Not yet supported (planned for future releases)
116
-
-**Vite Version**: Requires Vite 8 or higher versions for now
165
+
-**[DevTools for Rolldown](/rolldown/)**: Currently supports build mode only, requires Vite 8+
166
+
-**Dev mode**: Dev mode support is planned for future releases
117
167
118
168
## Architecture Overview
119
169
120
170
Vite DevTools consists of several core packages:
121
171
122
-
-**`@vitejs/devtools`**: The main entry point and CLI
123
-
-**`@vitejs/devtools-kit`**: Utilities and types for building custom integrations
124
-
-**`@vitejs/devtools-rolldown`**: Built-in UI panel for Rolldown
172
+
-**`@vitejs/devtools`**: The core framework, CLI, and runtime hosts
173
+
-**`@vitejs/devtools-kit`**: Vite DevTools Kit — utilities and types for building custom integrations
174
+
-**`@vitejs/devtools-rolldown`**: [DevTools for Rolldown](/rolldown/) — built-in build analysis UI
175
+
-**`@vitejs/devtools-vite`**: DevTools for Vite *(in development)*
125
176
-**`@vitejs/devtools-rpc`**: RPC layer for server-client communication
126
177
127
-
For more details on extending Vite DevTools, see the [DevTools Kit documentation](/kit/).
178
+
Third-party integrations like [Oxc Inspector](https://github.com/yuyinws/oxc-inspector) can also integrate via the DevTools Kit plugin API.
179
+
180
+
For more details on extending the devtools, see the [Vite DevTools Kit documentation](/kit/).
Copy file name to clipboardExpand all lines: docs/index.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ theme: dark
4
4
5
5
hero:
6
6
name: Vite DevTools
7
-
text: DevTools for Vite.
8
-
tagline: Visualize and analyze your Vite build process with powerful developer tools
7
+
text: DevTools Framework for the Vite Ecosystem.
8
+
tagline: An extensible foundation for building and composing developer tools across the Vite ecosystem
9
9
actions:
10
10
- theme: brand
11
11
text: Get Started
@@ -19,11 +19,11 @@ hero:
19
19
20
20
features:
21
21
- icon: 🔍
22
-
title: Build Analysis
23
-
details: Deep insights into your Vite-Rolldown build process. Visualize module graphs, dependencies, and build metadata to understand what's happening under the hood.
22
+
title: DevTools for Rolldown
23
+
details: Built-in integration for Rolldown build analysis. Visualize module graphs, dependencies, chunks, assets, and build metadata.
24
24
- icon: 🧩
25
25
title: Extensible Architecture
26
-
details: Build custom DevTools integrations with the DevTools Kit. Extend any Vite plugin with a simple devtools hook to add your own visualizations and tools.
26
+
details: Build custom DevTools integrations with the DevTools Kit. Any Vite plugin can extend the devtools with a simple hook to add visualizations, inspectors, and tools.
27
27
- icon: 🚀
28
28
title: Unified Dock System
29
29
details: A familiar dock interface (like macOS Dock) where all DevTools integrations appear together. Switch between tools seamlessly in a consistent UI.
0 commit comments