
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
vite-plugin-vue-devtools
Advanced tools
vite-plugin-vue-devtools is a plugin for Vite that enhances the development experience for Vue.js applications. It provides a set of tools and features that make debugging and developing Vue components easier and more efficient.
Component Inspector
The Component Inspector allows developers to inspect and interact with Vue components directly within the browser's developer tools. This feature helps in understanding the component hierarchy and state.
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import VueDevTools from 'vite-plugin-vue-devtools';
export default defineConfig({
plugins: [vue(), VueDevTools()]
});
State Management Debugging
State Management Debugging provides tools to inspect and manipulate the state of Vuex stores or other state management libraries. This feature is crucial for tracking state changes and debugging state-related issues.
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import VueDevTools from 'vite-plugin-vue-devtools';
export default defineConfig({
plugins: [vue(), VueDevTools()]
});
Performance Monitoring
Performance Monitoring helps developers identify performance bottlenecks in their Vue applications. It provides insights into component rendering times and other performance metrics.
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import VueDevTools from 'vite-plugin-vue-devtools';
export default defineConfig({
plugins: [vue(), VueDevTools()]
});
vue-devtools is a standalone browser extension that provides a similar set of tools for debugging Vue.js applications. It offers component inspection, state management debugging, and performance monitoring. Unlike vite-plugin-vue-devtools, it is not tied to Vite and can be used with any Vue.js project.
vuex is a state management library for Vue.js. While it does not provide the same development tools as vite-plugin-vue-devtools, it integrates well with vue-devtools for state inspection and debugging. It is focused on managing the state of Vue applications.
English | 简体中文
💡 Ideas & Suggestions | 🗺️ Project Roadmap | 🧑💻 Discord Channel
vite-plugin-vue-devtools
is a Vite
plugin designed to enhance the Vue
developer experience.
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.
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).
Assets tab that shows all your static assets and their information. You can open the asset in the browser or download it.
Timeline tab has three categories: Performance, Router Navigations, and Pinia. You can switch between them to see the state changes and timelines.
Routes tab is a feature integrated with Vue Router, allowing you to view the registered routes and their details.
Pinia tab is a feature integrated with Pinia, allowing you to view the registered modules and their details.
Graph tab provides a graph view that show the relationship between components.
Inspect expose the vite-plugin-inspect integration, allowing you to inspect transformation steps of Vite. It can be helpful to understand how each plugin is transforming your code and spot potential issues.
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)
# vite-plugin-vue-devtools
pnpm install vite-plugin-vue-devtools -D
import { defineConfig } from 'vite'
import VueDevTools from 'vite-plugin-vue-devtools'
export default defineConfig({
plugins: [
VueDevTools(),
vue(),
],
})
interface AnalyzeOptions {
/**
* @default true
*/
rerenderTrace: boolean
}
interface VitePluginVueDevToolsOptions {
/**
* append an import to the module id ending with `appendTo` instead of adding a script into body
* useful for projects that do not use html file as an entry
*
* WARNING: only set this if you know exactly what it does.
*/
appendTo?: string | RegExp
/**
* Enable Vue DevTools to analyze the codebase by using Babel
* @default
* {
* rerenderTrace: true, // enable rerenderTrace feature
* }
*/
analyze?: Partial<AnalyzeOptions>
/**
* Customize openInEditor host (e.g. http://localhost:3000)
* @default false
*/
openInEditorHost?: string | false
}
Only available in development mode
.
Only support Vue3.0+
and Vite 3.1+
.
Only supports single-instance Vue
applications.
Doesn't support SSR
(If you're using Nuxt
, use nuxt/devtools directly).
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.
// This Vue instance will be ignored by the plugin.
createApp({
render: () => h(App),
devtools: {
hide: true,
},
})
This project is highly inspired by nuxt/devtools. Kudos to Anthony Fu and Nuxt
team for the awesome work!
FAQs
A vite plugin for Vue DevTools
The npm package vite-plugin-vue-devtools receives a total of 319,692 weekly downloads. As such, vite-plugin-vue-devtools popularity was classified as popular.
We found that vite-plugin-vue-devtools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.