|
1 |
| -# Project Moved to [vuejs/devtools-next](https://github.com/vuejs/devtools-next) |
2 |
| - |
3 |
| -<p align="center"> |
4 |
| - <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/bg.png" /> |
5 |
| -</p> |
6 |
| -<h1 align="center"> |
7 |
| -Vue DevTools <sup>Preview</sup> |
8 |
| -</h1> |
9 |
| - |
10 |
| -<p align="center"> |
11 |
| -English | <a href="./README.zh-CN.md">简体中文</a> |
12 |
| -</p> |
13 |
| - |
14 |
| -<p align="center"> |
15 |
| - <a href="https://www.npmjs.com/package/vite-plugin-vue-devtools" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/v/vite-plugin-vue-devtools" alt="NPM Version" /></a> |
16 |
| - <a href="https://www.npmjs.com/package/vite-plugin-vue-devtools" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/dt/vite-plugin-vue-devtools" alt="NPM Downloads" /></a> |
17 |
| - <a href="https://www.npmjs.com/package/vite-plugin-vue-devtools" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/node/v/vite-plugin-vue-devtools" alt="Node Compatibility" /></a> |
18 |
| - <a href="https://github.com/webfansplz/vite-plugin-vue-devtools/blob/main/LICENSE" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/github/license/webfansplz/vite-plugin-vue-devtools" alt="License" /></a> |
19 |
| -</p> |
20 |
| - |
21 |
| -<p align="center"> |
22 |
| - <a href="https://github.com/webfansplz/vite-plugin-vue-devtools/discussions/1">💡 Ideas & Suggestions</a> | |
23 |
| - <a href="https://github.com/webfansplz/vite-plugin-vue-devtools/discussions/2">🗺️ Project Roadmap</a> | |
24 |
| - <a href="https://discord.gg/sHyy7gVPUG">🧑💻 Discord Channel</a> |
25 |
| -</p> |
26 |
| - |
27 |
| -<p align="center"> |
28 |
| -<a href="https://stackblitz.com/edit/vitejs-vite-oxbwzk?file=vite.config.ts&view=preview"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a> |
29 |
| -</p> |
30 |
| - |
31 |
| - |
32 |
| -## 📖 Introduction |
33 |
| - |
34 |
| -`vite-plugin-vue-devtools` is a `Vite` plugin designed to enhance the `Vue` developer experience. |
35 |
| - |
36 |
| - |
37 |
| - |
38 |
| -## 🎉 Features |
39 |
| - |
40 |
| -### Pages |
41 |
| - |
42 |
| -The pages tab shows your current routes and provide a quick way to navigate to them. For dynamic routes, it also provide a form to fill with each params interactively. You can also use the textbox to play and test how each route is matched. |
43 |
| - |
44 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/pages.png" /> |
45 |
| - |
46 |
| - |
47 |
| -### Components |
48 |
| - |
49 |
| -Components tab show all the components you are using in your app and hierarchy. You can also select them to see the details of the component (e.g. data,props). |
50 |
| - |
51 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/components.png" /> |
52 |
| - |
53 |
| -### Assets |
54 |
| - |
55 |
| -Assets tab that shows all your static assets and their information. You can open the asset in the browser or download it. |
56 |
| - |
57 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/assets.png" /> |
58 |
| - |
59 |
| -### Timeline |
60 |
| - |
61 |
| -Timeline tab has three categories: Performance, Router Navigations, and [Pinia](https://github.com/vuejs/pinia). You can switch between them to see the state changes and timelines. |
62 |
| - |
63 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/timeline.png" /> |
64 |
| - |
65 |
| -### Routes |
66 |
| - |
67 |
| -Routes tab is a feature integrated with [Vue Router](https://github.com/vuejs/router), allowing you to view the registered routes and their details. |
68 |
| - |
69 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/routes.png" /> |
70 |
| - |
71 |
| -### Pinia |
72 |
| - |
73 |
| -Pinia tab is a feature integrated with [Pinia](https://github.com/vuejs/pinia), allowing you to view the registered modules and their details. |
74 |
| - |
75 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/pinia.png" /> |
76 |
| - |
77 |
| -### Graph |
78 |
| - |
79 |
| -Graph tab provides a graph view that show the relationship between components. |
80 |
| - |
81 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/graph.png" /> |
82 |
| - |
83 |
| -### Inspect |
84 |
| - |
85 |
| -Inspect expose the [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) integration, allowing you to inspect transformation steps of [Vite](https://vitejs.dev/). It can be helpful to understand how each plugin is transforming your code and spot potential issues. |
86 |
| - |
87 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/inspect.png" /> |
88 |
| - |
89 |
| -### Inspector |
90 |
| - |
91 |
| -You can also use the "Inspector" feature to inspect the DOM tree and see which component is rendering it. Click to go to your editor of the specific line. Making it much easier to make changes, without the requirement of understanding the project structure thoroughly. (This feature is implemented based on the [vite-plugin-vue-inspector](https://github.com/webfansplz/vite-plugin-vue-inspector)) |
92 |
| - |
93 |
| -<img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/inspector.png" height=450 /> |
94 |
| - |
95 |
| -## 📦 Installation |
96 |
| - |
97 |
| -``` |
98 |
| -
|
99 |
| -# vite-plugin-vue-devtools |
100 |
| -
|
101 |
| -pnpm install vite-plugin-vue-devtools -D |
102 |
| -
|
103 |
| -``` |
104 |
| - |
105 |
| -## 🦄 Usage |
106 |
| - |
107 |
| -### Configuration Vite |
108 |
| - |
109 |
| -```ts |
110 |
| -import { defineConfig } from 'vite' |
111 |
| -import VueDevTools from 'vite-plugin-vue-devtools' |
112 |
| - |
113 |
| -export default defineConfig({ |
114 |
| - plugins: [ |
115 |
| - VueDevTools(), |
116 |
| - vue(), |
117 |
| - ], |
118 |
| -}) |
119 |
| -``` |
120 |
| - |
121 |
| -### Options |
122 |
| - |
123 |
| -```ts |
124 |
| -interface AnalyzeOptions { |
125 |
| - /** |
126 |
| - * @default true |
127 |
| - */ |
128 |
| - rerenderTrace: boolean |
129 |
| -} |
130 |
| - |
131 |
| -interface VitePluginVueDevToolsOptions { |
132 |
| - /** |
133 |
| - * append an import to the module id ending with `appendTo` instead of adding a script into body |
134 |
| - * useful for projects that do not use html file as an entry |
135 |
| - * |
136 |
| - * WARNING: only set this if you know exactly what it does. |
137 |
| - */ |
138 |
| - appendTo?: string | RegExp |
139 |
| - /** |
140 |
| - * Enable Vue DevTools to analyze the codebase by using Babel |
141 |
| - * @default |
142 |
| - * { |
143 |
| - * rerenderTrace: true, // enable rerenderTrace feature |
144 |
| - * } |
145 |
| - */ |
146 |
| - analyze?: Partial<AnalyzeOptions> |
147 |
| - |
148 |
| - /** |
149 |
| - * Customize openInEditor host (e.g. http://localhost:3000) |
150 |
| - * @default false |
151 |
| - */ |
152 |
| - openInEditorHost?: string | false |
153 |
| -} |
154 |
| -``` |
155 |
| - |
156 |
| -## 💡 Notice |
157 |
| - |
158 |
| -- Only available in `development mode`. |
159 |
| -- Only support `Vue3.0+` and `Vite 3.1+`. |
160 |
| -- Only supports single-instance `Vue` applications. |
161 |
| -- Doesn't support `SSR` (If you're using `Nuxt`, use [nuxt/devtools](https://github.com/nuxt/devtools) directly). |
162 |
| -- The plugin follows `Vue's DevTools` configuration, so if you have configured the `hide` option, it will also be applied in this plugin. e.g. |
163 |
| - |
164 |
| - ```js |
165 |
| - // This Vue instance will be ignored by the plugin. |
166 |
| - createApp({ |
167 |
| - render: () => h(App), |
168 |
| - devtools: { |
169 |
| - hide: true, |
170 |
| - }, |
171 |
| - }) |
172 |
| - ``` |
173 |
| - |
174 |
| -## 📖 Blog Post |
175 |
| - |
176 |
| -- [Introducing Vue DevTools (Vite Plugin)](https://gist.github.com/webfansplz/bc90a773a0dd474a34e043ab2d2a37a4) |
177 |
| - |
178 |
| -## 🌸 Credits |
179 |
| - |
180 |
| -- This project is highly inspired by [nuxt/devtools](https://github.com/nuxt/devtools). Kudos to [Anthony Fu](https://github.com/antfu) and `Nuxt` team for the awesome work! |
181 |
| - |
182 |
| -- [vuejs/devtools](https://github.com/vuejs/devtools) |
183 |
| - |
184 |
| - |
185 |
| -## 👨💻 Contributors |
186 |
| - |
187 |
| -<a href="https://github.com/webfansplz/vite-plugin-vue-devtools/graphs/contributors"> |
188 |
| - <img src="https://contrib.rocks/image?repo=webfansplz/vite-plugin-vue-devtools" /> |
189 |
| -</a> |
190 |
| - |
191 |
| -## 📄 License |
192 |
| - |
193 |
| -[MIT LICENSE](./LICENSE) |
194 |
| - |
| 1 | +# 💡 Project Moved to [vuejs/devtools-next](https://github.com/vuejs/devtools-next) |
0 commit comments