z-vue-scan
z-vue-scan
A Vue scanning plugin that works with both Vue 2 and Vue 3. The component will flash with a red border when it will update.
Features
- 🎯 Works with both Vue 2 and Vue 3
- 🔄 Powered by vue-demi
- 📦 Lightweight
- 💪 Written in TypeScript
Installation
# npm
npm install z-vue-scan
# yarn
yarn add z-vue-scan
# pnpm
pnpm add z-vue-scan
Usage
interface Options {
enable?: boolean
hideCompnentName?: boolean
}
Vue 3
// vue3
import { createApp } from 'vue'
import VueScan, { type VueScanOptions } from 'z-vue-scan'
import App from './App.vue'
const isProduction = import.meta.env.PROD // or `process.env.NODE_ENV === 'production'`
const app = createApp(App)
if (!isProduction) {
app.use<VueScanOptions>(VueScan, {})
}
app.mount('#app')
Vue 2
// vue2
import Vue from 'vue'
import VueScan, { type VueScanBaseOptions } from 'z-vue-scan/vue2'
import App from './App.vue'
const isProduction = import.meta.env.PROD // or `process.env.NODE_ENV === 'production'`
if (!isProduction) {
Vue.use<VueScanBaseOptions>(VueScan, {})
}
new Vue({
render: h => h(App),
}).$mount('#app')
Nuxt Module
# npm
npm install z-vue-scan-nuxt-module
# yarn
yarn add z-vue-scan-nuxt-module
# pnpm
pnpm add z-vue-scan-nuxt-module
You can use z-vue-scan in your Nuxt project by adding it to the modules section in your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['z-vue-scan-nuxt-module'],
vueScan: {
// options
enable: true,
hideCompnentName: false
}
})
DevPilot Plugin (MCP for LLMs)
pnpm add unplugin-devpilot devpilot-plugin-vue-scan -D
The DevPilot plugin exposes Vue component render performance data to LLMs via MCP. It tracks component re-renders in real time and provides a queryVueScanData tool that returns per-component aggregated summaries with source code locations — enabling LLMs to analyze render performance and pinpoint issues.
See devpilot-plugin-vue-scan README for details.
Development
# Install dependencies
pnpm install
# Run development server with Vue 3 example
pnpm dev
# Run development server with Vue 2 example
pnpm dev:vue2
# Build the package
pnpm build
# Run type check
pnpm typecheck
# Run linting
pnpm lint
License
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.37 | ^2.0.0 || | MIT | |
| 0.0.36 | ^2.0.0 || | MIT | |
| 0.0.35 | ^2.0.0 || | MIT | |
| 0.0.34 | ^2.0.0 || | MIT | |
| 0.0.33 | ^2.0.0 || | MIT | |
| 0.0.32 | ^2.0.0 || | MIT | |
| 0.0.31 | ^2.0.0 || | MIT | |
| 0.0.30 | ^2.0.0 || | MIT | |
| 0.0.29 | ^2.0.0 || | MIT | |
| 0.0.28 | ^2.0.0 || | MIT | |
| 0.0.27 | ^2.0.0 || | MIT | |
| 0.0.26 | ^2.0.0 || | MIT | |
| 0.0.25 | ^2.0.0 || | MIT | |
| 0.0.24 | ^2.0.0 || | MIT | |
| 0.0.23 | ^2.0.0 || | MIT | |
| 0.0.22 | ^2.0.0 || | MIT | |
| 0.0.21 | ^2.0.0 || | MIT | |
| 0.0.20 | ^2.0.0 || | MIT | |
| 0.0.19 | ^2.0.0 || | MIT | |
| 0.0.18 | ^2.0.0 || | MIT | |
| 0.0.17 | ^2.0.0 || | MIT | |
| 0.0.16 | ^2.0.0 || | MIT | |
| 0.0.15 | ^2.0.0 || | MIT | |
| 0.0.14 | ^2.0.0 || | MIT | |
| 0.0.13 | ^2.0.0 || | MIT | |
| 0.0.12 | ^2.0.0 || | MIT | |
| 0.0.11 | ^2.0.0 || | MIT | |
| 0.0.10 | ^2.0.0 || | MIT | |
| 0.0.8 | ^2.0.0 || | MIT | |
| 0.0.7 | ^2.0.0 || | MIT |
Showing the latest 30 of 35. See every release on npm