npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@softcodefr/vue-lens

v0.0.16

Published

A Vite plugin for Vue.js debugging and inspection

Downloads

1,957

Readme

@softcodefr/vue-lens

Zero-config debug panel for Vue 3. Add one line to your Vite config and get real-time visibility into renders, routing, store mutations, network requests, and user interactions.

@softcodefr/vue-lens is a Vite plugin that injects a floating debug panel and horizontal timeline into a Vue app during local development. It runs only in vite dev and is excluded from production builds.

screen

Installation

pnpm add -D @softcodefr/vue-lens

Usage

// vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { vueLens } from '@softcodefr/vue-lens'

export default defineConfig({
  plugins: [
    vue(),
    vueLens({
      router: true,     // track Vue Router navigations
      store: true,      // track Pinia/Vuex mutations (auto-detected)
      network: true,    // track fetch requests + GraphQL
      timeline: true,   // show horizontal timeline panel
    }),
  ],
})

The panel mounts itself automatically in development. No Vue component needs to be added to the app.

Configuration Options

| Option | Default | Description | | --- | --- | --- | | router | false | Tracks Vue Router navigations by instrumenting router.afterEach. | | store | false | Tracks Pinia or Vuex mutations. Auto-detects from package.json. | | network | false | Wraps window.fetch to track HTTP requests with GraphQL support. | | timeline | false | Enables horizontal timeline panel with interaction tracking. |

Features

Main Panel

  • Renders tab: Component re-render count with heat map, hover to highlight DOM elements
  • Routes tab: Navigation history with from/to paths and timestamps
  • Store tab: Real-time mutation log for Pinia/Vuex with store + action names
  • Network tab: HTTP requests with status codes, durations, and GraphQL operation names
  • Draggable: Reposition anywhere on screen
  • Shadow DOM: Isolated styles, no conflicts with your app

Timeline Panel (when timeline: true)

  • Horizontal scrollable timeline at bottom of screen
  • Groups events by causal activity (100ms window)
  • Click groups to expand render/route/store/network children
  • Hover render events to highlight components in DOM
  • Shows user interactions (clicks, inputs, form submits) as trigger events

How It Works

SFC Transform

The plugin automatically instruments Vue Single File Components:

<!-- Your component -->
<script setup>
const count = ref(0)
</script>

<!-- What gets compiled -->
<script setup>
import { onRenderTriggered, onMounted, getCurrentInstance } from 'vue'
import { collector } from '@softcodefr/vue-lens-core'

const __vlUid = Math.random().toString(36).slice(2)

onRenderTriggered((event) => {
  collector.emit({
    type: 'render',
    component: 'MyComponent',
    uid: __vlUid,
    reason: event.key,
    ts: Date.now()
  })
})

onMounted(() => {
  const el = getCurrentInstance()?.proxy?.$el
  if (el?.setAttribute) el.setAttribute('data-vue-lens-id', __vlUid)
})

const count = ref(0)
</script>

Class Component Support

Components using vue-facing-decorator are also instrumented automatically.

Virtual Module Injection

The panel is injected via virtual modules into your app's main entry file, requiring zero manual imports.

Store Auto-Detection

Reads your package.json to detect Pinia or Vuex automatically.

Development

# Build the plugin
pnpm build

# Run in watch mode  
pnpm dev

# Type checking
pnpm typecheck

Core Package

This plugin depends on @softcodefr/vue-lens-core for event collection and buffering.

import { collector } from '@softcodefr/vue-lens-core'

// Listen to all events
collector.on((event) => {
  console.log(event.type) // 'render' | 'route' | 'store' | 'network' | 'interaction'
})